summaryrefslogtreecommitdiff
path: root/test/default_run.py
diff options
context:
space:
mode:
author David Srbecky <dsrbecky@google.com> 2022-11-21 18:33:08 +0000
committer David Srbecky <dsrbecky@google.com> 2022-11-24 13:26:10 +0000
commit66bd69a135260978561e51ec6cde85de60b08dc8 (patch)
tree323575d9816355fa69c7dfbf40c2f71b1b34c8bc /test/default_run.py
parent4d14f77185c20cb5cb5050230c660374621b0b13 (diff)
Run test: Do output post-processing on device.
Run the various 'sed' commands on device. Also move the adb push/pull commands from default_run.py (which may be executed several times for multi-pass tests) to run-test (which is executed just once). This is a step towards being able to create runner bash file, so that all tests are executed using the same common pattern: adb push <inputs>; adb shell sh <runner>; adb pull <outputs> Test: ./art/test.py -b -r --optimizing --64 Change-Id: I4e1862ab4dc853175ec85c712e452420e91bc6b7
Diffstat (limited to 'test/default_run.py')
-rwxr-xr-xtest/default_run.py18
1 files changed, 1 insertions, 17 deletions
diff --git a/test/default_run.py b/test/default_run.py
index c6d6563ca1..c30b651079 100755
--- a/test/default_run.py
+++ b/test/default_run.py
@@ -1146,16 +1146,6 @@ def default_run(ctx, args, **kwargs):
ANDROID_LOG_TAGS = args.android_log_tags
if not HOST:
- adb.root()
- adb.wait_for_device()
- 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)
- # Copy resource folder
- if isdir("res"):
- adb.push("res", CHROOT_DEX_LOCATION)
-
# Populate LD_LIBRARY_PATH.
LD_LIBRARY_PATH = ""
if ANDROID_ROOT != "/system":
@@ -1243,10 +1233,7 @@ def default_run(ctx, args, **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/ && 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)}")
+ run_cmd(f"rm -rf {DEX_LOCATION}/{{oat,dalvik-cache}}/ && mkdir -p {mkdir_locations}")
run_cmd(f"{profman_cmdline}", env)
run_cmd(f"{dex2oat_cmdline}", env)
run_cmd(f"{dm_cmdline}", env)
@@ -1256,9 +1243,6 @@ def default_run(ctx, args, **kwargs):
run_cmd(tee(f"{timeout_prefix} {dalvikvm_cmdline}"),
env,
expected_exit_code=args.expected_exit_code)
- # Copy the on-device stdout/stderr to host.
- adb.pull(f"{CHROOT}{DEX_LOCATION}/{basename(args.stdout_file)}", args.stdout_file)
- adb.pull(f"{CHROOT}{DEX_LOCATION}/{basename(args.stderr_file)}", args.stderr_file)
else:
# Host run.
if USE_ZIPAPEX or USE_EXRACTED_ZIPAPEX: