summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYongqin Liu <yongqin.liu@linaro.org>2018-11-29 13:13:19 +0800
committerYongqin Liu <yongqin.liu@linaro.org>2018-11-29 15:26:19 +0800
commit9665593ed77d21bfcf1146b073257fb23f0792ef (patch)
treed1aa5a1509cd09cde0366247f5cca5c114e4ce7c
parent9b516c8daaae483c64a3b70fb2d8bb188fafe3e9 (diff)
noninteractive-tradefed/tradefed.yaml: drop the use [[
to workaround [[ not found problem like reported here: https://validation.linaro.org/scheduler/job/1899056#L3522 Change-Id: I1d7bb4debe0acf9b576d0e0f64fa90b9bbcb544d Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
-rwxr-xr-xautomated/android/noninteractive-tradefed/test-cts-loccal.sh25
-rw-r--r--automated/android/noninteractive-tradefed/tradefed.yaml4
2 files changed, 27 insertions, 2 deletions
diff --git a/automated/android/noninteractive-tradefed/test-cts-loccal.sh b/automated/android/noninteractive-tradefed/test-cts-loccal.sh
new file mode 100755
index 0000000..abc655c
--- /dev/null
+++ b/automated/android/noninteractive-tradefed/test-cts-loccal.sh
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+adb root
+
+module="CtsAndroidAppTestCases"
+TIMEOUT="300"
+TEST_URL="http://127.0.0.1:8080/android-cts-9.0_r1-linux_x86-arm-linaro.zip"
+TEST_PARAMS="run cts -m ${module} --abi arm64-v8a --disable-reboot --skip-preconditions --skip-device-info"
+TEST_PATH="android-cts"
+RESULTS_FORMAT="aggregated"
+
+# ./tradefed.sh -o "${TIMEOUT}" -c "${TEST_URL}" -t "${TEST_PARAMS}" -p "${TEST_PATH}" -r "${RESULTS_FORMAT}"
+adb shell dmesg >dmesg.before
+
+android-cts/tools/cts-tradefed run commandAndExit \
+ cts \
+ -m ${module} \
+ --abi arm64-v8a \
+ --disable-reboot \
+ --skip-preconditions \
+ --skip-device-info \
+ --skip-system-status-check com.android.compatibility.common.tradefed.targetprep.NetworkConnectivityChecker \
+ | tee cts-${module}.log
+
+adb shell dmesg >dmesg.after
diff --git a/automated/android/noninteractive-tradefed/tradefed.yaml b/automated/android/noninteractive-tradefed/tradefed.yaml
index 9f9ae70..74ce5b4 100644
--- a/automated/android/noninteractive-tradefed/tradefed.yaml
+++ b/automated/android/noninteractive-tradefed/tradefed.yaml
@@ -46,7 +46,7 @@ run:
# create test use to run the cts/vts tests
- useradd -m testuser && echo "testuser created successfully"
- chown testuser:testuser .
- - if [[ ${TEST_REBOOT_EXPECTED} == "true" ]]; then ./monitor_fastboot.sh & fi
+ - if ${TEST_REBOOT_EXPECTED}; 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
@@ -61,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
- - if [[ ${TEST_REBOOT_EXPECTED} == "true" ]]; then killall monitor_fastboot.sh; fi
+ - if ${TEST_REBOOT_EXPECTED}; then killall monitor_fastboot.sh; fi