aboutsummaryrefslogtreecommitdiff
path: root/automated/android/optee
diff options
context:
space:
mode:
authorChase Qi <chase.qi@linaro.org>2017-08-28 15:56:19 +0800
committerChase Qi <chase.qi@linaro.org>2017-08-28 15:56:19 +0800
commitc59a05c5f62d7e5d7ebe3d1003d396bc74e4a9d0 (patch)
tree686270f2a5d4f0db0e16de07f0cc14ec2791ed0a /automated/android/optee
parent496f1f7e6c5d597e58d825e8573af70a51109d4c (diff)
xtest: fix result parser
* Escape metacharacter '+' to make it more portable. * Use decimal for result measurement. Change-Id: I6f4c565481d7a2add55cd79399c355e9ee6e7d9a Signed-off-by: Chase Qi <chase.qi@linaro.org>
Diffstat (limited to 'automated/android/optee')
-rwxr-xr-xautomated/android/optee/optee-xtest.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/automated/android/optee/optee-xtest.sh b/automated/android/optee/optee-xtest.sh
index 6875cbb..8ba62c6 100755
--- a/automated/android/optee/optee-xtest.sh
+++ b/automated/android/optee/optee-xtest.sh
@@ -46,7 +46,7 @@ fi
adb shell "echo xtest -l ${LEVEL} -t ${TEST_SUITE} 2>&1 | su" | tee "${LOGFILE}"
# Parse xtest test log.
-awk "/Result of testsuite ${TEST_SUITE}:/{flag=1; next} /+-----------------------------------------------------/{flag=0} flag" "${LOGFILE}" \
+awk "/Result of testsuite ${TEST_SUITE}:/{flag=1; next} /\+-----------------------------------------------------/{flag=0} flag" "${LOGFILE}" \
| sed 's/OK/pass/; s/FAILED/fail/; s/SKIPPED/skip/' \
| awk '{printf("%s %s\n", $1, $2)}' \
| tee -a "${RESULT_FILE}"
@@ -55,7 +55,7 @@ awk "/Result of testsuite ${TEST_SUITE}:/{flag=1; next} /+----------------------
for i in "subtests" "test cases"; do
grep -E "^[0-9]+ $i of which [0-9]+ failed" "${LOGFILE}" \
| awk -v tc="$(echo "$i" | sed 's/ /-/')" \
- '{printf("%s-fail-rate pass %s/%s\n"), tc, $(NF-1), $1}' \
+ '{printf("%s-fail-rate pass %s\n"), tc, $(NF-1)/$1}' \
| tee -a "${RESULT_FILE}"
done