diff options
author | 2022-10-14 16:11:56 +0100 | |
---|---|---|
committer | 2022-10-14 17:02:22 +0000 | |
commit | 77aa45d604e97a31c9403e2f9cf8958200ba8c21 (patch) | |
tree | 059e7fc3c237c258df44ee375032b2e8e2010bc3 | |
parent | 323f6f42b89ee1df862812e5bb18540d6e22c42d (diff) |
run-libcore-tests.py: add a --verbose option
This removes any filtering done by run-libcore-tests.py and passes the
verbose flag onto vogar.
Bug: 253209203
Test: art/tools/run-libcore-tests.sh --mode=device --variant=X64 --verbose
Change-Id: I8e0f589eb31cbe1dc3d50e8de9a1d892169cb300
-rwxr-xr-x | tools/run-libcore-tests.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/run-libcore-tests.py b/tools/run-libcore-tests.py index b230377f3e..e1f08a14c1 100755 --- a/tools/run-libcore-tests.py +++ b/tools/run-libcore-tests.py @@ -42,6 +42,7 @@ def parse_args(): help='Enable GC stress configuration (device|host only).') parser.add_argument('tests', nargs="*", help='Name(s) of the test(s) to run') + parser.add_argument('--verbose', action='store_true', help='Print verbose output from vogar.') return parser.parse_args() ART_TEST_ANDROID_ROOT = os.environ.get("ART_TEST_ANDROID_ROOT", "/system") @@ -403,6 +404,7 @@ def get_vogar_command(test_name): if args.mode == "device": cmd.append("--mode=device --vm-arg -Ximage:/system/framework/art_boot_images/boot.art") cmd.append("--vm-arg -Xbootclasspath:" + ":".join(BOOT_CLASSPATH)) + if args.mode == "host": # We explicitly give a wrong path for the image, to ensure vogar # will create a boot image with the default compiler. Note that @@ -435,6 +437,9 @@ def get_vogar_command(test_name): cmd.append("--vm-arg -Xcompiler-option --vm-arg --compiler-filter=quicken") cmd.append("--vm-arg -Xusejit:{}".format(str(args.jit).lower())) + if args.verbose: + cmd.append("--verbose") + # Suppress color codes if not attached to a terminal if not sys.stdout.isatty(): cmd.append("--no-color") @@ -491,7 +496,7 @@ def main(): print(f"Running {len(futures)} tasks on {args.jobs} core(s)...\n") for i, future in enumerate(concurrent.futures.as_completed(futures)): test_name, cmd, stdout, exit_code = future.result() - if exit_code != 0 or args.dry_run: + if exit_code != 0 or args.dry_run or args.verbose: print(cmd) print(stdout.strip()) else: |