Snap for 11520864 from bbebf37730e1b838e148293c1dfe423223318bbb to 24Q2-release
Change-Id: Iaa6086143e75191a9170e18deb6253097a59e729
diff --git a/.gitignore b/.gitignore
index 803c297..dd264ef 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,3 +4,4 @@
**/*.iml
**/*.pyc
**/*.swn
+tools/boot.out
diff --git a/test/testrunner/env.py b/test/testrunner/env.py
index 8313756..de24b4c 100644
--- a/test/testrunner/env.py
+++ b/test/testrunner/env.py
@@ -152,11 +152,10 @@
ART_TEST_SSH_PORT = _env.get('ART_TEST_SSH_PORT', 10001)
ART_TEST_SSH_USER = _env.get('ART_TEST_SSH_USER', 'ubuntu')
ART_TEST_SSH_HOST = _env.get('ART_TEST_SSH_HOST', 'localhost')
-ART_SSH_CMD = _env.get('ART_SSH_CMD', f"ssh -q -i ~/.ssh/ubuntu -p {ART_TEST_SSH_PORT} "
- f"-o StrictHostKeyChecking=no "
+ART_SSH_CONFIG = os.path.join(os.path.dirname(__file__), 'ssh_config')
+ART_SSH_CMD = _env.get('ART_SSH_CMD', f"ssh -q -F {ART_SSH_CONFIG} -p {ART_TEST_SSH_PORT} "
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_SCP_CMD = _env.get('ART_SCP_CMD', f"scp -q -F {ART_SSH_CONFIG} -P {ART_TEST_SSH_PORT} -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")
diff --git a/test/testrunner/ssh_config b/test/testrunner/ssh_config
new file mode 100644
index 0000000..6d847e9
--- /dev/null
+++ b/test/testrunner/ssh_config
@@ -0,0 +1,6 @@
+Host *
+ IdentityFile ~/.ssh/ubuntu
+ StrictHostKeyChecking no
+ ControlMaster auto
+ ControlPersist 10m
+ ControlPath /run/user/%i/ssh-%C
diff --git a/test/testrunner/testrunner.py b/test/testrunner/testrunner.py
index 14fd0ca..ab1098e 100755
--- a/test/testrunner/testrunner.py
+++ b/test/testrunner/testrunner.py
@@ -316,7 +316,8 @@
device_name = get_device_name()
if n_thread == 0:
# Use only part of the cores since fully loading the device tends to lead to timeouts.
- n_thread = max(1, int(get_target_cpu_count() * 0.75))
+ fraction = 1.0 if env.ART_TEST_ON_VM else 0.75
+ n_thread = max(1, int(get_target_cpu_count() * fraction))
if device_name == 'fugu':
n_thread = 1
else: