diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/override.targets | 16 | ||||
-rw-r--r-- | tests/runtest.cmd | 2 | ||||
-rwxr-xr-x | tests/runtest.sh | 27 | ||||
-rwxr-xr-x | tests/scripts/arm32_ci_script.sh | 5 | ||||
-rwxr-xr-x | tests/scripts/run-xunit-perf.sh | 31 | ||||
-rw-r--r-- | tests/src/CoreMangLib/cti/system/string/StringReplace3.csproj | 2 | ||||
-rw-r--r-- | tests/src/Interop/ICastable/Castable.cs | 2 | ||||
-rw-r--r-- | tests/src/Interop/ICastable/Castable.csproj | 2 | ||||
-rw-r--r-- | tests/src/Interop/NativeCallable/NativeCallableTest.cs | 2 | ||||
-rw-r--r-- | tests/src/Interop/NativeCallable/NativeCallableTest.csproj | 2 | ||||
-rw-r--r-- | tests/src/dir.targets | 2 | ||||
-rw-r--r-- | tests/src/managed/Compilation/HelloWorld.cs | 4 |
12 files changed, 34 insertions, 63 deletions
diff --git a/tests/override.targets b/tests/override.targets index 36a9615e73..a01163225f 100644 --- a/tests/override.targets +++ b/tests/override.targets @@ -6,27 +6,19 @@ <!-- Contains overrides for the nuget reference resolution. The regular nuget reference resolution will not copy references local, which we need in order to correctly execute the xunit project --> <Import Project="xunitwrapper.targets" Condition="'$(IsXunitWrapperProject)'=='true'" /> - - <!-- Override the AddDesignTimeFacadeReferences target to add the ability to reference the local version of mscorlib. + + <!-- Override the AddDesignTimeFacadeReferences target to add the ability to reference System.Private.CoreLib. Some tests use functionality not available in the portable reference assemblies. For portability reasons it's generally a good idea to reference the facades instead of the raw implementation assemblies. However, these tests are useful. --> <Target Name="AddDesignTimeFacadeReferences" - Condition="'$(TargetingDefaultPlatform)' == 'true'" + Condition="'$(ReferenceSystemPrivateCoreLib)' == 'true'" BeforeTargets="ResolveReferences" DependsOnTargets="GetReferenceAssemblyPaths" > - <PropertyGroup> - <_resolvedMscorlib Condition="'%(ReferencePath.FileName)' == 'mscorlib'">true</_resolvedMscorlib> - </PropertyGroup> - <!-- TODO_SPC: ? --> <ItemGroup> - <PossibleTargetFrameworks Include="$(_TargetFrameworkDirectories)" /> - <ReferencePath Include="%(PossibleTargetFrameworks.Identity)mscorlib.dll" - Condition="'$(ReferenceLocalMscorlib)' != 'true' and '$(_resolvedMscorlib)' != 'true' and '%(PossibleTargetFrameworks.Identity)' != '' and Exists('%(PossibleTargetFrameworks.Identity)mscorlib.dll')" /> - <ReferencePath Include="$(ProjectDir)\..\bin\Product\$(BuildOS).$(BuildArch).$(BuildType)\ref\mscorlib.dll" - Condition="'$(ReferenceLocalMscorlib)' == 'true' and '$(_resolvedMscorlib)' != 'true'" /> + <ReferencePath Include="$(ProjectDir)\..\bin\Product\$(BuildOS).$(BuildArch).$(BuildType)\System.Private.CoreLib.dll" /> </ItemGroup> </Target> </Project> diff --git a/tests/runtest.cmd b/tests/runtest.cmd index 89e2571da5..aa95f890df 100644 --- a/tests/runtest.cmd +++ b/tests/runtest.cmd @@ -210,6 +210,8 @@ if not exist %XunitTestBinBase% ( echo %__MsgPrefix%CORE_ROOT that will be used is: %CORE_ROOT% echo %__MsgPrefix%Starting the test run ... +del %CORE_ROOT%\mscorlib.ni.dll + set __BuildLogRootName=TestRunResults call :msbuild "%__ProjectFilesDir%\runtest.proj" /p:Runtests=true /clp:showcommandline diff --git a/tests/runtest.sh b/tests/runtest.sh index 1c072206d5..649e236b9d 100755 --- a/tests/runtest.sh +++ b/tests/runtest.sh @@ -339,9 +339,6 @@ function create_core_overlay { if [ ! -d "$coreClrBinDir" ]; then exit_with_error "$errorSource" "Directory specified by --coreClrBinDir does not exist: $coreClrBinDir" fi - if [ ! -f "$mscorlibDir/mscorlib.dll" ]; then - exit_with_error "$errorSource" "mscorlib.dll was not found in: $mscorlibDir" - fi if [ -z "$coreFxBinDir" ]; then exit_with_error "$errorSource" "One of --coreOverlayDir or --coreFxBinDir must be specified." "$printUsage" fi @@ -356,7 +353,6 @@ function create_core_overlay { cp -f -v "$coreFxBinDir/"* "$coreOverlayDir/" 2>/dev/null cp -f -v "$coreClrBinDir/"* "$coreOverlayDir/" 2>/dev/null - cp -f -v "$mscorlibDir/mscorlib.dll" "$coreOverlayDir/" 2>/dev/null if [ -d "$mscorlibDir/bin" ]; then cp -f -v "$mscorlibDir/bin/"* "$coreOverlayDir/" 2>/dev/null fi @@ -389,20 +385,15 @@ function precompile_overlay_assemblies { echo Unable to generate dasm for $filename fi else - # Precompile any assembly except mscorlib since we already have its NI image available. - if [[ "$filename" != *"mscorlib.dll"* ]]; then - if [[ "$filename" != *"mscorlib.ni.dll"* ]]; then - echo Precompiling $filename - $overlayDir/crossgen /Platform_Assemblies_Paths $overlayDir $filename 2>/dev/null - local exitCode=$? - if [ $exitCode == -2146230517 ]; then - echo $filename is not a managed assembly. - elif [ $exitCode != 0 ]; then - echo Unable to precompile $filename. - else - echo Successfully precompiled $filename - fi - fi + echo Precompiling $filename + $overlayDir/crossgen /Platform_Assemblies_Paths $overlayDir $filename 2>/dev/null + local exitCode=$? + if [ $exitCode == -2146230517 ]; then + echo $filename is not a managed assembly. + elif [ $exitCode != 0 ]; then + echo Unable to precompile $filename. + else + echo Successfully precompiled $filename fi fi done diff --git a/tests/scripts/arm32_ci_script.sh b/tests/scripts/arm32_ci_script.sh index e80e8cf7bd..d223f6ab18 100755 --- a/tests/scripts/arm32_ci_script.sh +++ b/tests/scripts/arm32_ci_script.sh @@ -246,11 +246,6 @@ function copy_to_emulator { __testNativeBinDirBase="$__ARMEmulCoreclr/$__testNativeBinDirBase" sudo cp -R "./$__coreClrBinDirBase" "$__ARMRootfsCoreclrPath/$__coreClrBinDirBase" - if [ ! -z "$__mscorlibDir" ]; then - sudo cp "$__mscorlibDir/mscorlib.dll" "$__ARMRootfsCoreclrPath/$__coreClrBinDirBase/" - else - sudo cp "./$__coreClrBinDirBase/mscorlib.dll" "$__ARMRootfsCoreclrPath/$__coreClrBinDirBase/" - fi __coreClrBinDirBase="$__ARMEmulCoreclr/$__coreClrBinDirBase" __mscorlibDirBase="$__coreClrBinDirBase" diff --git a/tests/scripts/run-xunit-perf.sh b/tests/scripts/run-xunit-perf.sh index 27f84c2011..6f49bf6e0a 100755 --- a/tests/scripts/run-xunit-perf.sh +++ b/tests/scripts/run-xunit-perf.sh @@ -200,9 +200,6 @@ function create_core_overlay { if [ ! -d "$coreClrBinDir" ]; then exit_with_error "$errorSource" "Directory specified by --coreClrBinDir does not exist: $coreClrBinDir" fi - if [ ! -f "$mscorlibDir/mscorlib.dll" ]; then - exit_with_error "$errorSource" "mscorlib.dll was not found in: $mscorlibDir" - fi if [ -z "$coreFxBinDir" ]; then exit_with_error "$errorSource" "One of --coreOverlayDir or --coreFxBinDir must be specified." "$printUsage" fi @@ -217,12 +214,7 @@ function create_core_overlay { cp -f -v "$coreFxBinDir"/* "$coreOverlayDir/" 2>/dev/null cp -f -v "$coreClrBinDir/"* "$coreOverlayDir/" 2>/dev/null - cp -f -v "$mscorlibDir/mscorlib.dll" "$coreOverlayDir/" cp -n -v "$testDependenciesDir"/* "$coreOverlayDir/" 2>/dev/null - if [ -f "$coreOverlayDir/mscorlib.ni.dll" ]; then - # Test dependencies come from a Windows build, and mscorlib.ni.dll would be the one from Windows - rm -f "$coreOverlayDir/mscorlib.ni.dll" - fi } function precompile_overlay_assemblies { @@ -235,20 +227,15 @@ function precompile_overlay_assemblies { for fileToPrecompile in ${filesToPrecompile} do local filename=${fileToPrecompile} - # Precompile any assembly except mscorlib since we already have its NI image available. - if [[ "$filename" != *"mscorlib.dll"* ]]; then - if [[ "$filename" != *"mscorlib.ni.dll"* ]]; then - echo Precompiling $filename - $overlayDir/crossgen /Platform_Assemblies_Paths $overlayDir $filename 2>/dev/null - local exitCode=$? - if [ $exitCode == -2146230517 ]; then - echo $filename is not a managed assembly. - elif [ $exitCode != 0 ]; then - echo Unable to precompile $filename. - else - echo Successfully precompiled $filename - fi - fi + echo Precompiling $filename + $overlayDir/crossgen /Platform_Assemblies_Paths $overlayDir $filename 2>/dev/null + local exitCode=$? + if [ $exitCode == -2146230517 ]; then + echo $filename is not a managed assembly. + elif [ $exitCode != 0 ]; then + echo Unable to precompile $filename. + else + echo Successfully precompiled $filename fi done else diff --git a/tests/src/CoreMangLib/cti/system/string/StringReplace3.csproj b/tests/src/CoreMangLib/cti/system/string/StringReplace3.csproj index 5addaf30c1..e261d073f7 100644 --- a/tests/src/CoreMangLib/cti/system/string/StringReplace3.csproj +++ b/tests/src/CoreMangLib/cti/system/string/StringReplace3.csproj @@ -16,7 +16,7 @@ <AllowUnsafeBlocks>true</AllowUnsafeBlocks> <CLRTestKind>BuildAndRun</CLRTestKind> <CLRTestPriority>0</CLRTestPriority> - <ReferenceLocalMscorlib>true</ReferenceLocalMscorlib> + <ReferenceSystemPrivateCoreLib>true</ReferenceSystemPrivateCoreLib> </PropertyGroup> <!-- Default configurations to help VS understand the configurations --> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> diff --git a/tests/src/Interop/ICastable/Castable.cs b/tests/src/Interop/ICastable/Castable.cs index 9e119c1ccb..f2281deab2 100644 --- a/tests/src/Interop/ICastable/Castable.cs +++ b/tests/src/Interop/ICastable/Castable.cs @@ -6,6 +6,8 @@ using System.Collections.Generic; using System.Diagnostics; using System.Runtime.CompilerServices; +using Console = Internal.Console; + public interface IRetArg<T> { T ReturnArg(T t); diff --git a/tests/src/Interop/ICastable/Castable.csproj b/tests/src/Interop/ICastable/Castable.csproj index 874e35d566..7c96d7e533 100644 --- a/tests/src/Interop/ICastable/Castable.csproj +++ b/tests/src/Interop/ICastable/Castable.csproj @@ -16,7 +16,7 @@ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp> <DefineConstants>$(DefineConstants);STATIC</DefineConstants> - <ReferenceLocalMscorlib>true</ReferenceLocalMscorlib> + <ReferenceSystemPrivateCoreLib>true</ReferenceSystemPrivateCoreLib> </PropertyGroup> <!-- Default configurations to help VS understand the configurations --> <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'"> diff --git a/tests/src/Interop/NativeCallable/NativeCallableTest.cs b/tests/src/Interop/NativeCallable/NativeCallableTest.cs index 0dcc184b4a..c0b057b7ef 100644 --- a/tests/src/Interop/NativeCallable/NativeCallableTest.cs +++ b/tests/src/Interop/NativeCallable/NativeCallableTest.cs @@ -10,6 +10,8 @@ using System.Reflection.Emit; using System.Runtime.InteropServices; using System.Threading; +using Console = Internal.Console; + public class Program { public static class NativeMethods diff --git a/tests/src/Interop/NativeCallable/NativeCallableTest.csproj b/tests/src/Interop/NativeCallable/NativeCallableTest.csproj index a4e9018cfc..f9fb3ddec0 100644 --- a/tests/src/Interop/NativeCallable/NativeCallableTest.csproj +++ b/tests/src/Interop/NativeCallable/NativeCallableTest.csproj @@ -15,7 +15,7 @@ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir> <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp> <DefineConstants>$(DefineConstants);STATIC</DefineConstants> - <ReferenceLocalMscorlib>true</ReferenceLocalMscorlib> + <ReferenceSystemPrivateCoreLib>true</ReferenceSystemPrivateCoreLib> </PropertyGroup> <!-- Default configurations to help VS understand the configurations --> <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'"> diff --git a/tests/src/dir.targets b/tests/src/dir.targets index 5c2b077842..336a0b03fa 100644 --- a/tests/src/dir.targets +++ b/tests/src/dir.targets @@ -50,7 +50,7 @@ <_CLRTestNeedsProjectToRun Condition=" '$(_CLRTestNeedsToRun)' and '!$(_CLRTestBuildsExecutable)' ">true</_CLRTestNeedsProjectToRun> </PropertyGroup> - <PropertyGroup Condition="'$(ReferenceLocalMscorlib)' == 'true'"> + <PropertyGroup Condition="'$(ReferenceSystemPrivateCoreLib)' == 'true'"> <ProjectJson>$(SourceDir)Common/empty/project.json</ProjectJson> <ProjectLockJson>$(SourceDir)Common/empty/project.lock.json</ProjectLockJson> </PropertyGroup> diff --git a/tests/src/managed/Compilation/HelloWorld.cs b/tests/src/managed/Compilation/HelloWorld.cs index bbf92a3117..289afe482b 100644 --- a/tests/src/managed/Compilation/HelloWorld.cs +++ b/tests/src/managed/Compilation/HelloWorld.cs @@ -3,12 +3,12 @@ // See the LICENSE file in the project root for more information. // -using System; +using Internal; class C { static int Main() { - LowLevelConsole.WriteLine("Hello " + "world"); + Console.WriteLine("Hello " + "world"); return 100; } } |