From 356a08f7e90113b31005c02abb14662bc40bed70 Mon Sep 17 00:00:00 2001 From: Egor Chesakov Date: Thu, 15 Nov 2018 10:43:05 -0800 Subject: Combine ExcludeList in AltJit scenarios for both host and altjit archs (#21018) * Add -altjitarch command line argument in tests/runtest.cmd and -altjit_arch in tests/runtest.py * Specify altjitarch in for x86_arm_altjit and x64_arm64_altjit jobs in netci.groovy * Use AltJitArch MSBuild variable in tests/issues.targets to exclude tests based on either BuildArch or AltJitArch since both two JITs are running in altjit scenarios --- tests/dir.props | 2 ++ tests/issues.targets | 14 +++++++------- tests/runtest.cmd | 5 +++++ tests/runtest.py | 13 ++++++++++++- 4 files changed, 26 insertions(+), 8 deletions(-) (limited to 'tests') diff --git a/tests/dir.props b/tests/dir.props index ffae126bb8..7a782a125e 100644 --- a/tests/dir.props +++ b/tests/dir.props @@ -64,6 +64,8 @@ $(RootBinDir)Product\$(BuildOS).$(BuildArch).$(BuildType)\ $(RootBinDir)Product\$(__BuildOS).$(__BuildArch).$(__BuildType)\ + + $(__AltJitArch) diff --git a/tests/issues.targets b/tests/issues.targets index b0f5098c27..5fe1694a95 100644 --- a/tests/issues.targets +++ b/tests/issues.targets @@ -69,7 +69,7 @@ - + needs triage @@ -202,7 +202,7 @@ - + needs triage @@ -320,7 +320,7 @@ - + 20682 @@ -336,7 +336,7 @@ - + 15016 @@ -451,7 +451,7 @@ - + 6217 @@ -564,7 +564,7 @@ - + Test times out @@ -592,7 +592,7 @@ - + 19340 diff --git a/tests/runtest.cmd b/tests/runtest.cmd index c0991ce1ee..6f3468791e 100644 --- a/tests/runtest.cmd +++ b/tests/runtest.cmd @@ -98,6 +98,7 @@ REM tieredcompilation is on by default now, but setting this environment variabl if /i "%1" == "tieredcompilation" (set COMPLUS_TieredCompilation=1&shift&goto Arg_Loop) if /i "%1" == "gcname" (set COMPlus_GCName=%2&shift&shift&goto Arg_Loop) if /i "%1" == "timeout" (set __TestTimeout=%2&shift&shift&goto Arg_Loop) +if /i "%1" == "altjitarch" (set __AltJitArch=%2&shift&shift&goto Arg_Loop) 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) @@ -208,6 +209,10 @@ if defined __PrintLastResultsOnly ( set __RuntestPyArgs=%__RuntestPyArgs% --analyze_results_only ) +if defined __AltJitArch ( + set __RuntestPyArgs=%__RuntestPyArgs% -altjit_arch %__AltJitArch% +) + REM __ProjectDir is poorly named, it is actually /tests set NEXTCMD=python "%__ProjectDir%\runtest.py" %__RuntestPyArgs% echo !NEXTCMD! diff --git a/tests/runtest.py b/tests/runtest.py index f847b2cdb8..ce04eb2073 100755 --- a/tests/runtest.py +++ b/tests/runtest.py @@ -103,6 +103,7 @@ parser.add_argument("-product_location", dest="product_location", nargs='?', def parser.add_argument("-coreclr_repo_location", dest="coreclr_repo_location", default=os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) parser.add_argument("-test_env", dest="test_env", default=None) parser.add_argument("-crossgen_altjit", dest="crossgen_altjit", default=None) +parser.add_argument("-altjit_arch", dest="altjit_arch", default=None) # Optional arguments which change execution. @@ -1490,7 +1491,8 @@ def build_test_wrappers(host_os, arch, build_type, coreclr_repo_location, - test_location): + test_location, + altjit_arch=None): """ Build the coreclr test wrappers Args: @@ -1544,6 +1546,9 @@ def build_test_wrappers(host_os, "/p:__BuildType=%s" % build_type, "/p:__LogsDir=%s" % logs_dir] + if not altjit_arch is None: + command += ["/p:__AltJitArch=%s" % altjit_arch] + print("Creating test wrappers...") print(" ".join(command)) @@ -2008,12 +2013,18 @@ def do_setup(host_os, # Line ending only need to be corrected if this is a cross build. correct_line_endings(host_os, test_location) + # If we are inside altjit scenario, we ought to re-build Xunit test wrappers to consider + # ExcludeList items in issues.targets for both build arch and altjit arch + is_altjit_scenario = not args.altjit_arch is None + if unprocessed_args.build_test_wrappers: build_test_wrappers(host_os, arch, build_type, coreclr_repo_location, test_location) elif build_info is None: build_test_wrappers(host_os, arch, build_type, coreclr_repo_location, test_location) elif not (is_same_os and is_same_arch and is_same_build_type): build_test_wrappers(host_os, arch, build_type, coreclr_repo_location, test_location) + elif is_altjit_scenario: + build_test_wrappers(host_os, arch, build_type, coreclr_repo_location, test_location, args.altjit_arch) return run_tests(host_os, arch, -- cgit v1.2.3