diff options
author | Jarret Shook <jashoo@microsoft.com> | 2019-01-16 09:35:16 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-16 09:35:16 -0800 |
commit | 5a81049245062814e3581b763c89c8a49058c8f5 (patch) | |
tree | 434dde6c6cf16e303c2b350218db3653fe740206 /tests | |
parent | 5ae949f8a4e7ddd4a3b7891f30a1d2911ca74873 (diff) | |
download | coreclr-5a81049245062814e3581b763c89c8a49058c8f5.tar.gz coreclr-5a81049245062814e3581b763c89c8a49058c8f5.tar.bz2 coreclr-5a81049245062814e3581b763c89c8a49058c8f5.zip |
Fix generate_layout_only (#21996)
* Fix generate_layout_only
* Correctly add all opons
* Clean run for cross built device
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/runtest.py | 155 |
1 files changed, 138 insertions, 17 deletions
diff --git a/tests/runtest.py b/tests/runtest.py index df5155720c..9677853e41 100755 --- a/tests/runtest.py +++ b/tests/runtest.py @@ -126,7 +126,7 @@ parser.add_argument("--large_version_bubble", dest="large_version_bubble", actio parser.add_argument("--precompile_core_root", dest="precompile_core_root", action="store_true", default=False) parser.add_argument("--sequential", dest="sequential", action="store_true", default=False) -parser.add_argument("--build_xunit_test_wrappers", dest="build_test_wrappers", action="store_true", default=False) +parser.add_argument("--build_xunit_test_wrappers", dest="build_xunit_test_wrappers", action="store_true", default=False) parser.add_argument("--generate_layout", dest="generate_layout", action="store_true", default=False) parser.add_argument("--generate_layout_only", dest="generate_layout_only", action="store_true", default=False) parser.add_argument("--analyze_results_only", dest="analyze_results_only", action="store_true", default=False) @@ -778,6 +778,12 @@ def setup_coredump_generation(host_os): print("CoreDump generation not enabled due to unsupported OS: %s" % host_os) return + if isinstance(coredump_pattern, bytes): + print("Binary data found. Decoding.") + coredump_pattern = coredump_pattern.decode('ascii') + + print("CoreDump Pattern: {}".format(coredump_pattern)) + # resource is only available on Unix platforms import resource @@ -1119,9 +1125,12 @@ def setup_args(args): location using the build type and the arch. """ + require_built_test_dir = not args.generate_layout_only and True + require_built_core_root = not args.generate_layout_only and True + coreclr_setup_args = CoreclrArguments(args, - require_built_test_dir=True, - require_built_core_root=True, + require_built_test_dir=require_built_test_dir, + require_built_core_root=require_built_core_root, require_built_product_dir=args.generate_layout_only) normal_location = os.path.join(coreclr_setup_args.bin_location, "tests", "%s.%s.%s" % (coreclr_setup_args.host_os, coreclr_setup_args.arch, coreclr_setup_args.build_type)) @@ -1173,9 +1182,118 @@ def setup_args(args): "Error setting test location.") coreclr_setup_args.verify(args, - "generate_layout", + "build_xunit_test_wrappers", + lambda arg: True, + "Error setting build_xunit_test_wrappers") + + coreclr_setup_args.verify(args, + "generate_layout_only", + lambda arg: True, + "Error setting generate_layout_only") + + if coreclr_setup_args.generate_layout_only: + # Force generate_layout + coreclr_setup_args.verify(args, + "generate_layout", + lambda arg: True, + "Error setting generate_layout", + modify_arg=lambda arg: True) + + else: + coreclr_setup_args.verify(args, + "generate_layout", + lambda arg: True, + "Error setting generate_layout") + + coreclr_setup_args.verify(args, + "test_env", lambda arg: True, - "Error setting generate_layout") + "Error setting test_env") + + coreclr_setup_args.verify(args, + "analyze_results_only", + lambda arg: True, + "Error setting analyze_results_only") + + coreclr_setup_args.verify(args, + "crossgen_altjit", + lambda arg: True, + "Error setting crossgen_altjit") + + coreclr_setup_args.verify(args, + "altjit_arch", + lambda arg: True, + "Error setting altjit_arch") + + coreclr_setup_args.verify(args, + "rid", + lambda arg: True, + "Error setting rid") + + coreclr_setup_args.verify(args, + "il_link", + lambda arg: True, + "Error setting il_link") + + coreclr_setup_args.verify(args, + "long_gc", + lambda arg: True, + "Error setting long_gc") + + coreclr_setup_args.verify(args, + "gcsimulator", + lambda arg: True, + "Error setting gcsimulator") + + coreclr_setup_args.verify(args, + "jitdisasm", + lambda arg: True, + "Error setting jitdisasm") + + coreclr_setup_args.verify(args, + "ilasmroundtrip", + lambda arg: True, + "Error setting ilasmroundtrip") + + coreclr_setup_args.verify(args, + "large_version_bubble", + lambda arg: True, + "Error setting large_version_bubble") + + coreclr_setup_args.verify(args, + "run_crossgen_tests", + lambda arg: True, + "Error setting run_crossgen_tests") + + coreclr_setup_args.verify(args, + "precompile_core_root", + lambda arg: True, + "Error setting precompile_core_root") + + coreclr_setup_args.verify(args, + "sequential", + lambda arg: True, + "Error setting sequential") + + coreclr_setup_args.verify(args, + "build_xunit_test_wrappers", + lambda arg: True, + "Error setting build_xunit_test_wrappers") + + coreclr_setup_args.verify(args, + "verbose", + lambda arg: True, + "Error setting verbose") + + coreclr_setup_args.verify(args, + "limited_core_dumps", + lambda arg: True, + "Error setting limited_core_dumps") + + coreclr_setup_args.verify(args, + "test_native_bin_location", + lambda arg: True, + "Error setting test_native_bin_location") is_same_os = False is_same_arch = False @@ -1213,16 +1331,7 @@ def setup_args(args): print("test_location :%s" % coreclr_setup_args.test_location) print("test_native_bin_location :%s" % coreclr_setup_args.test_native_bin_location) - return ( - coreclr_setup_args.host_os, - coreclr_setup_args.arch, - coreclr_setup_args.build_type, - coreclr_setup_args.coreclr_repo_location, - coreclr_setup_args.product_location, - coreclr_setup_args.core_root, - coreclr_setup_args.test_location, - coreclr_setup_args.test_native_bin_location - ) + return coreclr_setup_args def setup_tools(host_os, coreclr_repo_location): """ Setup the tools for the repo @@ -2226,7 +2335,7 @@ def do_setup(host_os, # 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: + if unprocessed_args.build_xunit_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) @@ -2261,7 +2370,19 @@ def main(args): global g_verbose g_verbose = args.verbose - host_os, arch, build_type, coreclr_repo_location, product_location, core_root, test_location, test_native_bin_location = setup_args(args) + coreclr_setup_args = setup_args(args) + args = coreclr_setup_args + + host_os, arch, build_type, coreclr_repo_location, product_location, core_root, test_location, test_native_bin_location = ( + coreclr_setup_args.host_os, + coreclr_setup_args.arch, + coreclr_setup_args.build_type, + coreclr_setup_args.coreclr_repo_location, + coreclr_setup_args.product_location, + coreclr_setup_args.core_root, + coreclr_setup_args.test_location, + coreclr_setup_args.test_native_bin_location + ) ret_code = 0 |