diff options
author | Clark Laughlin <clark.laughlin@linaro.org> | 2015-05-27 17:22:22 -0400 |
---|---|---|
committer | Clark Laughlin <clark.laughlin@linaro.org> | 2015-05-27 17:22:22 -0400 |
commit | 488f46dd3035d243e3f460a1f00b69a76d89eee5 (patch) | |
tree | 4ebbbacc87084f5b501c798a7eb3aec10a61fa7b /tools | |
parent | 5aabc1992462e45f5b69b6a28c7441cea99b3704 (diff) |
another script to dump in xml format
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/parse-subunit-stream-as-xml | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tools/parse-subunit-stream-as-xml b/tools/parse-subunit-stream-as-xml new file mode 100755 index 0000000..708b192 --- /dev/null +++ b/tools/parse-subunit-stream-as-xml @@ -0,0 +1,24 @@ +#!/bin/bash + +SUBUNIT=${1} +ALL_TESTS=${2} + +if [ ! -e "${SUBUNIT}" ] ; then + echo "Subunit stream not found: ${SUBUNIT}" + exit 1 +fi + +TEMP_DIR=$(cat /proc/sys/kernel/random/uuid) + +rm -rf ${TEMP_DIR} +mkdir ${TEMP_DIR} + +# generate CSV files containing lists of all tests that were RUN, all FAILED tests, all SKIPPED tests, and all PASSING tests +cat ${SUBUNIT} | subunit2junitxml --no-passthrough > ${TEMP_DIR}/run.xml +cat ${SUBUNIT} | subunit-filter --only-genuine-failures --passthrough | subunit2junitxml > ${TEMP_DIR}/failed.xml +cat ${SUBUNIT} | subunit-filter --no-error --no-failure --no-success --no-xfail | subunit2junitxml --no-passthrough > ${TEMP_DIR}/skipped.xml +cat ${SUBUNIT} | subunit-filter --no-skip --no-failure --success | subunit2junitxml --no-passthrough > ${TEMP_DIR}/passing.xml +if [ -e "${ALL_TESTS}" ] ; then + cp ${ALL_TESTS} ${TEMP_DIR}/all.txt +fi +echo "Results have been stored in [${TEMP_DIR}]" |