summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Ulya Trafimovich <skvadrik@google.com> 2024-06-26 09:21:08 +0100
committer Ulya Trofimovich <skvadrik@google.com> 2024-07-08 07:55:36 +0000
commitd685b0e5d8f3b38b3e492ffc1989e188885edda0 (patch)
treed7c8d7e3489b53ab922d648d6b5e941538718cb6
parentb0b9465f5e60087ac69552783ee863a17ba00515 (diff)
Redirect dex2oat logs to stderr for VM tests.
VM environment is somewhere in-between host and target: we consider VM a target device use the target builds for it, but it's Linux rather than Android, so it has no logcat / tombstoned, and all the logs must go to stderr, or else they are lost. This patch redirects dex2oat logs to stderr (dalvikvm logs were already redirected). Test: Ran VM tests on LUCI with this patch (using led), observed dex2oat logs on stderr (some tests are currently failing). Bug: 283085397 Change-Id: I37ae66feb8a8d51aef3abb908affd15bbf7ede23
-rwxr-xr-xtest/default_run.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/default_run.py b/test/default_run.py
index 25b94b3f09..9fdd5a0909 100755
--- a/test/default_run.py
+++ b/test/default_run.py
@@ -799,6 +799,10 @@ def default_run(ctx, args, **kwargs):
dex2oat_cmdline += f"gdb {GDB_DEX2OAT_EXTRA_ARGS} \
-d '{ANDROID_BUILD_TOP}' --args "
+ dex2oat_logger = ""
+ if ON_VM:
+ dex2oat_logger = "--runtime-arg -Xuse-stderr-logger"
+
dex2oat_cmdline += f"'{ANDROID_ART_BIN_DIR}/{dex2oat_binary}' \
{COMPILE_FLAGS} \
--boot-image={BOOT_IMAGE} \
@@ -807,6 +811,7 @@ def default_run(ctx, args, **kwargs):
{app_image} \
--generate-mini-debug-info \
--instruction-set={ISA} \
+ {dex2oat_logger} \
{class_loader_context}"
if INSTRUCTION_SET_FEATURES != "":