summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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