aboutsummaryrefslogtreecommitdiff
path: root/automated/android
diff options
context:
space:
mode:
authorKarsten Tausche <karsten@fairphone.com>2019-01-16 10:38:35 +0100
committerChase Qi <chase.qi@linaro.org>2019-03-14 10:38:11 +0800
commit91c916c00747aa1fa52dbb5707cb5a5b24c0243e (patch)
tree62eba0e4064e39e79d8e17bd9e2c1e67c38f5746 /automated/android
parent9fc64443ef62dc2f57fc12a6cf61a42094336afe (diff)
MultiNode Tradefed: Fix udev access for fastboot
Execute the Tradefed runner as the current user, which is root in the context of LAVA LXC environments. This prevents getting udev permission issues in fastboot or adb, if udev rules are incomplete for specific Android devices and the device IDs they might report in different modes. Without this change, the `fastboot reboot` calls in the runner don't have any effect on affected configurations. Change-Id: Ie21cc417c78ec88da523f0d14ea85c1e9bcb912c Signed-off-by: Karsten Tausche <karsten@fairphone.com>
Diffstat (limited to 'automated/android')
-rw-r--r--automated/android/multinode/tradefed/tradefed-multinode.yaml10
1 files changed, 2 insertions, 8 deletions
diff --git a/automated/android/multinode/tradefed/tradefed-multinode.yaml b/automated/android/multinode/tradefed/tradefed-multinode.yaml
index 8c02eb6..3e30a21 100644
--- a/automated/android/multinode/tradefed/tradefed-multinode.yaml
+++ b/automated/android/multinode/tradefed/tradefed-multinode.yaml
@@ -61,13 +61,8 @@ run:
if [ -z "${DEVICE_WORKER_MAPPING_FILE}" -o ! -f "${DEVICE_WORKER_MAPPING_FILE}" ]; then
lava-test-raise "Parameter DEVICE_WORKER_MAPPING_FILE must be defined and point to an existing file."
fi
- - lava-install-packages --no-install-recommends aapt curl default-jre-headless python3-pexpect sudo usbutils wget xz-utils zip
- # delete the test user to clean environment
- - userdel testuser -r -f || true
- # create test use to run the cts/vts tests
- - useradd -m testuser && echo "testuser created successfully"
+ - lava-install-packages --no-install-recommends aapt curl default-jre-headless python3-pexpect usbutils wget xz-utils zip
- cd ./automated/android/multinode/tradefed
- - chown testuser:testuser .
- |
if [ "${TEST_PARAMS_AUTO_SHARDS}" = "true" ]; then
num_shards="$(lava-role list | grep -v '^$' | wc -l)"
@@ -83,7 +78,7 @@ run:
# available in the CTS execution scripts.
- |
exec_result=0
- sudo -u testuser env "PATH=${PATH}" ./tradefed-multinode.sh \
+ ./tradefed-multinode.sh \
-o "${TIMEOUT_SECS}" -c "${TEST_URL}" -t "${TEST_PARAMS}" \
-u "${TEST_RETRY_PARAMS}" -i "${MAX_NUM_RUNS}" \
-n "${RUNS_IF_UNCHANGED}" -p "${TEST_PATH}" \
@@ -112,7 +107,6 @@ run:
done
# Send test result to LAVA.
- ../../../utils/send-to-lava.sh ./output/result.txt || true
- - userdel testuser -f -r || true
# When adb devices are lost, mark the test job as 'incomplete'
- |
lost_devices=""