diff options
author | Jan Vorlicek <janvorli@microsoft.com> | 2019-06-11 10:54:52 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-11 10:54:52 +0200 |
commit | f70085f37f3c49618087f852e44165954b3ed8d6 (patch) | |
tree | 75a54676341528eacde3a4ea98525428c8f66b35 /tests | |
parent | d5906ecce405c8ff9476a1ea3d9a297bf5d9991c (diff) | |
download | coreclr-f70085f37f3c49618087f852e44165954b3ed8d6.tar.gz coreclr-f70085f37f3c49618087f852e44165954b3ed8d6.tar.bz2 coreclr-f70085f37f3c49618087f852e44165954b3ed8d6.zip |
Enable lab support for coreclr tests in unloadable context (#25064)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/helixpublishwitharcade.proj | 7 | ||||
-rw-r--r-- | tests/runtest.cmd | 6 | ||||
-rwxr-xr-x | tests/runtest.py | 2 | ||||
-rw-r--r-- | tests/src/CLRTest.Execute.Bash.targets | 2 | ||||
-rw-r--r-- | tests/src/CLRTest.Execute.Batch.targets | 2 |
5 files changed, 13 insertions, 6 deletions
diff --git a/tests/helixpublishwitharcade.proj b/tests/helixpublishwitharcade.proj index 1016f94b1d..74d5eb78ac 100644 --- a/tests/helixpublishwitharcade.proj +++ b/tests/helixpublishwitharcade.proj @@ -25,6 +25,7 @@ HelixType=$(_HelixType); PublishTestResults=$(_PublishTestResults); RunCrossGen=$(_RunCrossGen); + RunInUnloadableContext=$(_RunInUnloadableContext); TimeoutPerTestCollectionInMinutes=$(_TimeoutPerTestCollectionInMinutes); TimeoutPerTestInMinutes=$(_TimeoutPerTestInMinutes) </_PropertiesToPass> @@ -124,6 +125,8 @@ </ItemGroup> <Copy SourceFiles="@(_XUnitConsoleRunnerFiles)" DestinationFolder="$(CoreRootDirectory)" /> + <Copy SourceFiles="$(MSBuildThisFileDirectory)\scripts\runincontext.cmd" DestinationFolder="$(CoreRootDirectory)" Condition=" '$(TargetsWindows)' == 'true' and '$(RunInUnloadableContext)' == 'true'" /> + <Copy SourceFiles="$(MSBuildThisFileDirectory)/scripts/runincontext.sh" DestinationFolder="$(CoreRootDirectory)" Condition=" '$(TargetsWindows)' != 'true' and '$(RunInUnloadableContext)' == 'true'" /> </Target> <Target Name="CreateTestEnvFiles"> @@ -177,6 +180,8 @@ <ItemGroup Condition=" '$(TargetsWindows)' == 'true' "> <HelixPreCommand Include="set CORE_ROOT=%HELIX_CORRELATION_PAYLOAD%" /> <HelixPreCommand Include="set RunCrossGen=1" Condition=" '$(RunCrossGen)' == 'true' " /> + <HelixPreCommand Include="set RunInUnloadableContext=1" Condition=" '$(RunInUnloadableContext)' == 'true' " /> + <HelixPreCommand Include="set CLRCustomTestLauncher=%HELIX_CORRELATION_PAYLOAD%\runincontext.cmd" Condition=" '$(RunInUnloadableContext)' == 'true' " /> <HelixPreCommand Include="set __TestEnv=%HELIX_WORKITEM_PAYLOAD%\$(TestEnvFileName)" /> <HelixPreCommand Include="set __TestTimeout=$(TimeoutPerTestInMilliseconds)" Condition=" '$(TimeoutPerTestInMilliseconds)' != '' " /> <HelixPreCommand Include="type %__TestEnv%" /> @@ -185,6 +190,8 @@ <ItemGroup Condition=" '$(TargetsWindows)' != 'true' "> <HelixPreCommand Include="export CORE_ROOT=$HELIX_CORRELATION_PAYLOAD" /> <HelixPreCommand Include="export RunCrossGen=1" Condition=" '$(RunCrossGen)' == 'true' " /> + <HelixPreCommand Include="export RunInUnloadableContext=1" Condition=" '$(RunInUnloadableContext)' == 'true' " /> + <HelixPreCommand Include="export CLRCustomTestLauncher=$HELIX_WORKITEM_PAYLOAD/runincontext.sh" Condition=" '$(RunInUnloadableContext)' == 'true' " /> <HelixPreCommand Include="export __TestEnv=$HELIX_WORKITEM_PAYLOAD/$(TestEnvFileName)" /> <HelixPreCommand Include="export __TestTimeout=$(TimeoutPerTestInMilliseconds)" Condition=" '$(TimeoutPerTestInMilliseconds)' != '' " /> <HelixPreCommand Include="cat $__TestEnv" /> diff --git a/tests/runtest.cmd b/tests/runtest.cmd index bb1dd353d8..18a13ae5c3 100644 --- a/tests/runtest.cmd +++ b/tests/runtest.cmd @@ -36,7 +36,7 @@ set __CoreFXTestsRunAllAvailable= set __SkipGenerateLayout= set __BuildXUnitWrappers= set __PrintLastResultsOnly= -set __RunInUnloadableContext= +set RunInUnloadableContext= :Arg_Loop if "%1" == "" goto ArgsDone @@ -94,7 +94,7 @@ REM change it to COMPlus_GCStress when we stop using xunit harness if /i "%1" == "gcstresslevel" (set COMPlus_GCStress=%2&set __TestTimeout=1800000&shift&shift&goto Arg_Loop) if /i "%1" == "collectdumps" (set __CollectDumps=true&shift&goto Arg_Loop) -if /i "%1" == "runincontext" (set __RunInUnloadableContext=1&shift&goto Arg_Loop) +if /i "%1" == "runincontext" (set RunInUnloadableContext=1&shift&goto Arg_Loop) if /i not "%1" == "msbuildargs" goto SkipMsbuildArgs :: All the rest of the args will be collected and passed directly to msbuild. @@ -206,7 +206,7 @@ if defined __AltJitArch ( set __RuntestPyArgs=%__RuntestPyArgs% -altjit_arch %__AltJitArch% ) -if defined __RunInUnloadableContext ( +if defined RunInUnloadableContext ( set __RuntestPyArgs=%__RuntestPyArgs% --run_in_context ) diff --git a/tests/runtest.py b/tests/runtest.py index 07005c9bdd..5dfb375be3 100755 --- a/tests/runtest.py +++ b/tests/runtest.py @@ -1066,7 +1066,7 @@ def run_tests(host_os, if run_in_context: print("Running test in an unloadable AssemblyLoadContext") os.environ["CLRCustomTestLauncher"] = os.path.join(coreclr_repo_location, "tests", "scripts", "runincontext%s" % (".cmd" if host_os == "Windows_NT" else ".sh")) - os.environ["__RunInUnloadableContext"] = "1"; + os.environ["RunInUnloadableContext"] = "1"; per_test_timeout = 20*60*1000 # Set __TestTimeout environment variable, which is the per-test timeout in milliseconds. diff --git a/tests/src/CLRTest.Execute.Bash.targets b/tests/src/CLRTest.Execute.Bash.targets index 44dfcdb204..02ac8ccf53 100644 --- a/tests/src/CLRTest.Execute.Bash.targets +++ b/tests/src/CLRTest.Execute.Bash.targets @@ -81,7 +81,7 @@ fi ]]></BashCLRTestEnvironmentCompatibilityCheck> <BashCLRTestEnvironmentCompatibilityCheck Condition="'$(UnloadabilityIncompatible)' == 'true'"><![CDATA[ $(BashCLRTestEnvironmentCompatibilityCheck) -if [ ! -z "$__RunInUnloadableContext" ] +if [ ! -z "$RunInUnloadableContext" ] then echo SKIPPING EXECUTION BECAUSE the test is incompatible with unloadability exit $(GCBashScriptExitCode) diff --git a/tests/src/CLRTest.Execute.Batch.targets b/tests/src/CLRTest.Execute.Batch.targets index 19ab05be18..f14a73bfd7 100644 --- a/tests/src/CLRTest.Execute.Batch.targets +++ b/tests/src/CLRTest.Execute.Batch.targets @@ -78,7 +78,7 @@ IF NOT "%COMPlus_GCStress%"=="" ( ]]></BatchCLRTestEnvironmentCompatibilityCheck> <BatchCLRTestEnvironmentCompatibilityCheck Condition="'$(UnloadabilityIncompatible)' == 'true'"><![CDATA[ $(BatchCLRTestEnvironmentCompatibilityCheck) -IF NOT "%__RunInUnloadableContext%"=="" ( +IF NOT "%RunInUnloadableContext%"=="" ( ECHO SKIPPING EXECUTION BECAUSE the test is incompatible with unloadability popd Exit /b 0 |