diff options
author | Chase Qi <chase.qi@linaro.org> | 2017-08-28 15:56:19 +0800 |
---|---|---|
committer | Chase Qi <chase.qi@linaro.org> | 2017-08-28 15:56:19 +0800 |
commit | c59a05c5f62d7e5d7ebe3d1003d396bc74e4a9d0 (patch) | |
tree | 686270f2a5d4f0db0e16de07f0cc14ec2791ed0a /automated/linux/optee | |
parent | 496f1f7e6c5d597e58d825e8573af70a51109d4c (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/linux/optee')
-rwxr-xr-x | automated/linux/optee/optee-xtest.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/automated/linux/optee/optee-xtest.sh b/automated/linux/optee/optee-xtest.sh index 3d297a1..67ed80d 100755 --- a/automated/linux/optee/optee-xtest.sh +++ b/automated/linux/optee/optee-xtest.sh @@ -36,7 +36,7 @@ pipe0_status "${test_cmd}" "tee ${LOG_FILE}" check_return "xtest-run" # Parse xtest test log. -awk "/Result of testsuite ${TEST_SUITE}:/{flag=1; next} /+-----------------------------------------------------/{flag=0} flag" "${LOG_FILE}" \ +awk "/Result of testsuite ${TEST_SUITE}:/{flag=1; next} /\+-----------------------------------------------------/{flag=0} flag" "${LOG_FILE}" \ | sed 's/OK/pass/; s/FAILED/fail/; s/SKIPPED/skip/' \ | awk '{printf("%s %s\n", $1, $2)}' \ | tee -a "${RESULT_FILE}" @@ -45,7 +45,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" "${LOG_FILE}" \ | 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 |