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
diff --git a/tools/run-libcore-tests.py b/tools/run-libcore-tests.py
index b230377..e1f08a1 100755
--- a/tools/run-libcore-tests.py
+++ b/tools/run-libcore-tests.py
@@ -42,6 +42,7 @@
                       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 @@
   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 @@
       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 @@
     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: