Qemu: Set more default env variables in testrunner
Test: art/test.py --target -r --ndebug --64 --optimizing 001-Main
Change-Id: I672cb5e985745c68f2454e835a345a0225940619
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")