summaryrefslogtreecommitdiff
path: root/test/default_run.py
diff options
context:
space:
mode:
author David Srbecky <dsrbecky@google.com> 2022-11-17 11:02:20 +0000
committer Treehugger Robot <treehugger-gerrit@google.com> 2022-11-17 13:19:52 +0000
commitbf31c39402673dfb3cec5e34688cc06a6252c0fb (patch)
tree550a9b002b18fe8db822986f7cede248f5d871df /test/default_run.py
parentc282befbc62c5dd8102b5f275bc9001eeba9a91d (diff)
Run test run: Reduce verbosity
All commands are printed to terminal for failing tests. Reduce the number of commands printed. In particular, 'echo' which was used only for debugging. Test: Observe terminal output for failing test Change-Id: Ief4f95363e4463b1234b743ef623f25d49d6c3f1
Diffstat (limited to 'test/default_run.py')
-rwxr-xr-xtest/default_run.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/test/default_run.py b/test/default_run.py
index b6d2451d02..3f1baf394b 100755
--- a/test/default_run.py
+++ b/test/default_run.py
@@ -1146,8 +1146,7 @@ def default_run(ctx, args, **kwargs):
if not HOST:
adb.root()
adb.wait_for_device()
- adb.shell(f"rm -rf {CHROOT_DEX_LOCATION}")
- adb.shell(f"mkdir -p {CHROOT_DEX_LOCATION}")
+ adb.shell(f"rm -rf {CHROOT_DEX_LOCATION} && mkdir -p {CHROOT_DEX_LOCATION}")
adb.push(f"{TEST_NAME}*.jar", CHROOT_DEX_LOCATION)
if PROFILE or RANDOM_PROFILE:
adb.push("profile", CHROOT_DEX_LOCATION, check=False)
@@ -1260,15 +1259,13 @@ def default_run(ctx, args, **kwargs):
cmdfile.flush()
adb.push(
cmdfile.name, f"{CHROOT_DEX_LOCATION}/cmdline.sh", save_cmd=False)
- run('echo cmdline.sh "' + cmdline.replace('"', '\\"') + '"')
chroot_prefix = f"chroot {CHROOT}" if CHROOT else ""
return adb.shell(f"{chroot_prefix} sh {DEX_LOCATION}/cmdline.sh", **kwargs)
if USE_GDB or USE_GDBSERVER:
print(f"Forward {GDBSERVER_PORT} to local port and connect GDB")
- run_cmd(f"rm -rf {DEX_LOCATION}/dalvik-cache/")
- run_cmd(f"mkdir -p {mkdir_locations}")
+ run_cmd(f"rm -rf {DEX_LOCATION}/dalvik-cache/ && mkdir -p {mkdir_locations}")
# Restore stdout/stderr from previous run (the directory might have been cleared).
adb.push(args.stdout_file, f"{CHROOT}{DEX_LOCATION}/{basename(args.stdout_file)}")
adb.push(args.stderr_file, f"{CHROOT}{DEX_LOCATION}/{basename(args.stderr_file)}")