diff options
author | Vishal Bhoj <vishal.bhoj@linaro.org> | 2018-04-19 14:14:51 +0530 |
---|---|---|
committer | Milosz Wasilewski <milosz.wasilewski@linaro.org> | 2018-04-19 11:19:54 +0000 |
commit | 5430c639040267a70038baa49a4683db8087b4da (patch) | |
tree | 9df076c74192bdfe574fa9ec669657b8e1aea1fd | |
parent | c38be5852826d4459cba46add67402a135c76c78 (diff) |
tradefed: cleanup monitor_fastboot implementation
Print script output.
Make it optional
Change-Id: I9892f2b615ef50168d87526f4f5e5359eb849765
Signed-off-by: Vishal Bhoj <vishal.bhoj@linaro.org>
-rwxr-xr-x | automated/android/tradefed/monitor_fastboot.sh | 2 | ||||
-rw-r--r-- | automated/android/tradefed/tradefed.yaml | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/automated/android/tradefed/monitor_fastboot.sh b/automated/android/tradefed/monitor_fastboot.sh index ca7cb44..9c6aea4 100755 --- a/automated/android/tradefed/monitor_fastboot.sh +++ b/automated/android/tradefed/monitor_fastboot.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/sh -ex while true; do fastboot boot /lava-lxc/boot.img done diff --git a/automated/android/tradefed/tradefed.yaml b/automated/android/tradefed/tradefed.yaml index 4f06a58..44af753 100644 --- a/automated/android/tradefed/tradefed.yaml +++ b/automated/android/tradefed/tradefed.yaml @@ -33,6 +33,7 @@ params: AP_KEY: "" # Specify the failures number to be printed FAILURES_PRINTED: "0" + TEST_REBOOT_EXPECTED: "false" run: steps: @@ -45,7 +46,7 @@ run: # create test use to run the cts/vts tests - useradd -m testuser && echo "testuser created successfully" - chown testuser:testuser . - - ./monitor_fastboot.sh & + - if [[ ${TEST_REBOOT_EXPECTED} == "true" ]]; then ./monitor_fastboot.sh & fi - sudo -u testuser ./tradefed.sh -o "${TIMEOUT}" -c "${TEST_URL}" -t "${TEST_PARAMS}" -p "${TEST_PATH}" -r "${RESULTS_FORMAT}" -n "${ANDROID_SERIAL}" -f "${FAILURES_PRINTED}" -a "${AP_SSID}" -k "${AP_KEY}" # Upload test log and result files to artifactorial. - cp -r ./${TEST_PATH}/results ./output/ || true @@ -60,4 +61,4 @@ run: - userdel testuser -f -r || true # When adb device lost, end test job to mark it as 'incomplete'. - if ! adb shell echo ok; then error_fatal "adb device $ANDROID_SERIAL lost!"; fi - - killall monitor_fastboot.sh + - if [[ ${TEST_REBOOT_EXPECTED} == "true" ]]; then killall monitor_fastboot.sh; fi |