6094576889
[stack@undercloud-0 tobiko]$ subunit2junitxml ./last.subunit -o tobiko_results_junitxml.xml [stack@undercloud-0 tobiko]$ cat tobiko_results_junitxml.xml <testsuite errors="0" failures="0" name="" tests="1" time="4.199"> <testcase classname="tobiko.tests.functional.tripleo.test_overcloud.OvercloudPacemakerTest" name="test_pacemaker_resources_health" time="4.199"/> </testsuite> Change-Id: I7d4f9e00f718500a00af9bdb3f70462b1d79e6fc
23 lines
683 B
Bash
Executable File
23 lines
683 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# Produce test HTML report file into ${REPORT_DIR}
|
|
|
|
set -xeu
|
|
|
|
|
|
TESTR_DIR=${TESTR_DIR:-$(pwd)}
|
|
BUILD_DIR=${BUILD_DIR:-${TESTR_DIR}}
|
|
SUBUNIT_FILE=${SUBUNIT_FILE:-${BUILD_DIR}/last.subunit}
|
|
TESTR_RESULTS_HTML=${TESTR_RESULTS_HTML:-${BUILD_DIR}/tobiko_results.html}
|
|
TESTR_RESULTS_XML=${TESTR_RESULTS_XML:-${BUILD_DIR}/tobiko_results.xml}
|
|
|
|
|
|
make_testr_results_html() {
|
|
mkdir -p "$(dirname ${SUBUNIT_FILE})"
|
|
(cd "${TESTR_DIR}" && stestr last --subunit) > "${SUBUNIT_FILE}"
|
|
(cd "${BUILD_DIR}" && subunit2html "${SUBUNIT_FILE}" "${TESTR_RESULTS_HTML}")
|
|
(cd "${BUILD_DIR}" && subunit2junitxml "${SUBUNIT_FILE}" -o "${TESTR_RESULTS_XML}")
|
|
}
|
|
|
|
make_testr_results_html
|