diff options
author | Naresh Kamboju <naresh.kamboju@linaro.org> | 2017-05-15 18:12:20 +0530 |
---|---|---|
committer | Naresh Kamboju <naresh.kamboju@linaro.org> | 2017-05-17 18:05:57 +0530 |
commit | 648b835e90647a6365f936e999b708b9aae70388 (patch) | |
tree | ab634fe2bc7b18eb154f43187be4bf9a9c80caab | |
parent | e0dc6f63e66cda28d8d107f4079a64e386be54f9 (diff) |
Print results status in lower case pass/fail/skip
testcase name containing /dev/full coming twice in results summary.
once it is printing as pass as expected.
next time the default lava results parser printing as "unknown".
This issue is been fixed by chaning the "/" to "-"
Change-Id: Ib3f5be575e0b97c9c73b9e9e408218973d92a319
Signed-off-by: Naresh Kamboju <naresh.kamboju@linaro.org>
-rwxr-xr-x | automated/linux/libhugetlbfs/libhugetlbfs.sh | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/automated/linux/libhugetlbfs/libhugetlbfs.sh b/automated/linux/libhugetlbfs/libhugetlbfs.sh index 35027cd..cec7d28 100755 --- a/automated/linux/libhugetlbfs/libhugetlbfs.sh +++ b/automated/linux/libhugetlbfs/libhugetlbfs.sh @@ -6,6 +6,7 @@ OUTPUT="$(pwd)/output" RESULT_FILE="${OUTPUT}/result.txt" RESULT_LOG="${OUTPUT}/result_log.txt" +TMP_LOG="${OUTPUT}/tmp_log.txt" TEST_PASS_LOG="${OUTPUT}/test_pass_log.txt" TEST_FAIL_LOG="${OUTPUT}/test_fail_log.txt" TEST_SKIP_LOG="${OUTPUT}/test_skip_log.txt" @@ -29,6 +30,10 @@ while getopts "b:s:v:" o; do done parse_output() { + # Avoid results summary lines start with "*" + sed -i -e 's/\//-/g' "${TMP_LOG}" + # shellcheck disable=SC2063 + grep -v "*" "${TMP_LOG}" | tee -a "${RESULT_LOG}" # Parse each type of results egrep "PASS" "${RESULT_LOG}" | tee -a "${TEST_PASS_LOG}" sed -i -e 's/ (inconclusive)//g' "${TEST_PASS_LOG}" @@ -36,13 +41,14 @@ parse_output() { sed -i -e 's/)://g' "${TEST_PASS_LOG}" sed -i -e 's/://g' "${TEST_PASS_LOG}" awk '{for (i=1; i<NF-1; i++) printf $i "-"; print $i " " $NF}' "${TEST_PASS_LOG}" 2>&1 | tee -a "${RESULT_FILE}" + sed -i -e 's/PASS/pass/g' "${RESULT_FILE}" egrep "FAIL" "${RESULT_LOG}" | cut -d: -f 1-2 2>&1 | tee -a "${TEST_FAIL_LOG}" sed -i -e 's/ (inconclusive)//g' "${TEST_FAIL_LOG}" sed -i -e 's/(//g' "${TEST_FAIL_LOG}" sed -i -e 's/)//g' "${TEST_FAIL_LOG}" sed -i -e 's/://g' "${TEST_FAIL_LOG}" - awk '{for (i=1; i<NF; i++) printf $i "-"; print $i " " "FAIL"}' "${TEST_FAIL_LOG}" 2>&1 | tee -a "${RESULT_FILE}" + awk '{for (i=1; i<NF; i++) printf $i "-"; print $i " " "fail"}' "${TEST_FAIL_LOG}" 2>&1 | tee -a "${RESULT_FILE}" egrep "SKIP" "${RESULT_LOG}" | cut -d: -f 1-2 2>&1 | tee -a "${TEST_SKIP_LOG}" egrep "Bad configuration" "${RESULT_LOG}" | cut -d: -f 1-2 2>&1 | tee -a "${TEST_SKIP_LOG}" @@ -50,8 +56,9 @@ parse_output() { sed -i -e 's/(//g' "${TEST_SKIP_LOG}" sed -i -e 's/)//g' "${TEST_SKIP_LOG}" sed -i -e 's/://g' "${TEST_SKIP_LOG}" - awk '{for (i=1; i<NF; i++) printf $i "-"; print $i " " "SKIP"}' "${TEST_SKIP_LOG}" 2>&1 | tee -a "${RESULT_FILE}" - rm -rf "${RESULT_LOG}" "${TEST_PASS_LOG}" "${TEST_FAIL_LOG}" "${TEST_SKIP_LOG}" + awk '{for (i=1; i<NF; i++) printf $i "-"; print $i " " "skip"}' "${TEST_SKIP_LOG}" 2>&1 | tee -a "${RESULT_FILE}" + rm -rf "${TMP_LOG}" "${RESULT_LOG}" "${TEST_PASS_LOG}" "${TEST_FAIL_LOG}" "${TEST_SKIP_LOG}" + } libhugetlbfs_setup() { @@ -93,7 +100,7 @@ libhugetlbfs_run_test() { cd tests # Run tests # Redirect stdout (not stderr) - ./run_tests.py -b "${WORD_SIZE}" | tee -a "${RESULT_LOG}" + ./run_tests.py -b "${WORD_SIZE}" | tee -a "${TMP_LOG}" parse_output } |