Qemu: Set more default env variables in testrunner am: 6a181d347d am: 80a9e72914
Original change: https://android-review.googlesource.com/c/platform/art/+/2977715
Change-Id: I7cad25a5df60935dc8b08734065c03b3bf1d2bfe
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/test/run-test b/test/run-test
index 95af20c..17d5227 100755
--- a/test/run-test
+++ b/test/run-test
@@ -113,14 +113,14 @@
tmp_dir = f"{TMPDIR}/{test_dir}"
checker = f"{progdir}/../tools/checker/checker.py"
- ON_VM = os.environ.get("ART_TEST_ON_VM")
+ ON_VM = env.ART_TEST_ON_VM
SSH_USER = env.ART_TEST_SSH_USER
SSH_HOST = env.ART_TEST_SSH_HOST
SSH_PORT = env.ART_TEST_SSH_PORT
SSH_CMD = env.ART_SSH_CMD
- SCP_CMD = os.environ.get("ART_SCP_CMD")
- CHROOT = os.environ.get("ART_TEST_CHROOT")
- CHROOT_CMD = os.environ.get("ART_CHROOT_CMD")
+ SCP_CMD = env.ART_SCP_CMD
+ CHROOT = env.ART_TEST_CHROOT
+ CHROOT_CMD = env.ART_CHROOT_CMD
def fail(message: str, caller:Optional[FrameInfo]=None):
caller = caller or getframeinfo(currentframe().f_back) # type: ignore
diff --git a/test/testrunner/env.py b/test/testrunner/env.py
index 75d62eb..8313756 100644
--- a/test/testrunner/env.py
+++ b/test/testrunner/env.py
@@ -155,3 +155,10 @@
ART_SSH_CMD = _env.get('ART_SSH_CMD', f"ssh -q -i ~/.ssh/ubuntu -p {ART_TEST_SSH_PORT} "
f"-o StrictHostKeyChecking=no "
f"{ART_TEST_SSH_USER}@{ART_TEST_SSH_HOST}")
+ART_SCP_CMD = _env.get('ART_SCP_CMD', f"scp -i ~/.ssh/ubuntu -P {ART_TEST_SSH_PORT} "
+ f"-o StrictHostKeyChecking=no -p -r")
+ART_CHROOT_CMD = _env.get('ART_CHROOT_CMD', "unshare --user --map-root-user chroot art-test-chroot")
+if ART_TEST_ON_VM:
+ ART_TEST_CHROOT = _env.get('ART_TEST_CHROOT', f"/home/{ART_TEST_SSH_USER}/art-test-chroot")
+else:
+ ART_TEST_CHROOT = _env.get('ART_TEST_CHROOT', "/data/local/art-test-chroot")