summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChase Qi <chase.qi@linaro.org>2017-03-07 15:20:56 +0100
committerMilosz Wasilewski <milosz.wasilewski@linaro.org>2017-03-07 15:18:47 +0000
commit0bb32329287ed6742eb58f0f73b3e2d5d1930eee (patch)
tree6002fdb2a71344c22a9971cd8eea50072f6139c2
parent7d7ec4d7829808bbb10858729912ad3ed2733289 (diff)
downloadtest-definitions-pipe-0bb32329287ed6742eb58f0f73b3e2d5d1930eee.tar.gz
automated: android: handle failed cts test run
Change-Id: I907b91ee0670087551f5f61d8ea03a882e3c2208 Signed-off-by: Chase Qi <chase.qi@linaro.org>
-rwxr-xr-xautomated/android/cts/cts-runner.py9
-rwxr-xr-xautomated/android/cts/cts.sh1
2 files changed, 8 insertions, 2 deletions
diff --git a/automated/android/cts/cts-runner.py b/automated/android/cts/cts-runner.py
index aa25e21..50589e3 100755
--- a/automated/android/cts/cts-runner.py
+++ b/automated/android/cts/cts-runner.py
@@ -141,7 +141,14 @@ while child.isalive():
try:
# Check if all tests finished every minute.
- child.expect('I/ResultReporter: Full Result:', timeout=60)
+ m = child.expect(['I/ResultReporter: Full Result:',
+ 'I/ConsoleReporter:.*Test run failed to complete.'],
+ timeout=60)
+ if m == 0:
+ py_test_lib.add_result(RESULT_FILE, 'cts-test-run pass')
+ elif m == 1:
+ py_test_lib.add_result(RESULT_FILE, 'cts-test-run fail')
+
# Once all tests finshed, exit from tf shell and throw EOF.
child.sendline('exit')
child.expect(pexpect.EOF, timeout=60)
diff --git a/automated/android/cts/cts.sh b/automated/android/cts/cts.sh
index 34e56a7..9f5bdc3 100755
--- a/automated/android/cts/cts.sh
+++ b/automated/android/cts/cts.sh
@@ -81,7 +81,6 @@ fi
# Run CTS test.
./cts-runner.py -t "${TEST_PARAMS}" -n "${SN}"
-check_return "cts-test-run"
# Cleanup.
rm -f /etc/apt/sources.list.d/cts.list