From f70085f37f3c49618087f852e44165954b3ed8d6 Mon Sep 17 00:00:00 2001 From: Jan Vorlicek Date: Tue, 11 Jun 2019 10:54:52 +0200 Subject: Enable lab support for coreclr tests in unloadable context (#25064) --- 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 +- 5 files changed, 13 insertions(+), 6 deletions(-) (limited to 'tests') 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) @@ -124,6 +125,8 @@ + + @@ -177,6 +180,8 @@ + + @@ -185,6 +190,8 @@ + + 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 ]]>