From f70085f37f3c49618087f852e44165954b3ed8d6 Mon Sep 17 00:00:00 2001 From: Jan Vorlicek Date: Tue, 11 Jun 2019 10:54:52 +0200 Subject: [PATCH] Enable lab support for coreclr tests in unloadable context (#25064) --- eng/send-to-helix-step.yml | 2 ++ tests/helixpublishwitharcade.proj | 7 +++++++ tests/runtest.cmd | 6 +++--- tests/runtest.py | 2 +- tests/src/CLRTest.Execute.Bash.targets | 2 +- tests/src/CLRTest.Execute.Batch.targets | 2 +- 6 files changed, 15 insertions(+), 6 deletions(-) diff --git a/eng/send-to-helix-step.yml b/eng/send-to-helix-step.yml index bd90515..29c677c 100644 --- a/eng/send-to-helix-step.yml +++ b/eng/send-to-helix-step.yml @@ -41,6 +41,7 @@ steps: _HelixTargetQueues: ${{ join(',', parameters.helixQueues) }} _HelixType: ${{ parameters.helixType }} _RunCrossGen: ${{ parameters.runCrossGen }} + _RunInUnloadableContext: ${{ parameters.runInUnloadableContext }} _Scenarios: ${{ join(',', parameters.scenarios) }} _TimeoutPerTestCollectionInMinutes: ${{ parameters.timeoutPerTestCollectionInMinutes }} _TimeoutPerTestInMinutes: ${{ parameters.timeoutPerTestInMinutes }} @@ -76,6 +77,7 @@ steps: _HelixTargetQueues: ${{ join(',', parameters.helixQueues) }} _HelixType: ${{ parameters.helixType }} _RunCrossGen: ${{ parameters.runCrossGen }} + _RunInUnloadableContext: ${{ parameters.runInUnloadableContext }} _Scenarios: ${{ join(',', parameters.scenarios) }} _TimeoutPerTestCollectionInMinutes: ${{ parameters.timeoutPerTestCollectionInMinutes }} _TimeoutPerTestInMinutes: ${{ parameters.timeoutPerTestInMinutes }} diff --git a/tests/helixpublishwitharcade.proj b/tests/helixpublishwitharcade.proj index 1016f94..74d5eb7 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) @@ -124,6 +125,8 @@ + + @@ -177,6 +180,8 @@ + + @@ -185,6 +190,8 @@ + + diff --git a/tests/runtest.cmd b/tests/runtest.cmd index bb1dd35..18a13ae 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 07005c9..5dfb375 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 44dfcdb..02ac8cc 100644 --- a/tests/src/CLRTest.Execute.Bash.targets +++ b/tests/src/CLRTest.Execute.Bash.targets @@ -81,7 +81,7 @@ fi ]]>