From: Maxim Uvarov <maxim.uva...@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uva...@linaro.org> --- /** Email created from pull request 293 (muvarov:devel/master_shippable) ** https://github.com/Linaro/odp/pull/293 ** Patch: https://github.com/Linaro/odp/pull/293.patch ** Base sha: fc020907bee7ec2ba976bc02399f6fd47f110d65 ** Merge commit sha: 58fe98dfbff2d17d1643cb33291d47a9002962d3 **/ .shippable.yml | 1 + scripts/shipabble-stats.sh | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100755 scripts/shipabble-stats.sh
diff --git a/.shippable.yml b/.shippable.yml index 9fbb29190..3ddeb98e3 100644 --- a/.shippable.yml +++ b/.shippable.yml @@ -39,6 +39,7 @@ build: - ./configure --disable-test-perf - make - sudo env ODP_SHM_DIR=/dev/shm/odp make check + - scripts/shipabble-stats.sh on_failure: - cat config.log diff --git a/scripts/shipabble-stats.sh b/scripts/shipabble-stats.sh new file mode 100755 index 000000000..c2560fd4f --- /dev/null +++ b/scripts/shipabble-stats.sh @@ -0,0 +1,28 @@ +#!/bin/bash + + +cat <<EOF > $SHIPPABLE_BUILD_DIR/shippable/testresults/test_results.xml + +<?xml version="1.0" encoding="ISO-8859-1"?> +<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> +<xsl:output method="xml" indent="yes" /> +<xsl:template match="/"> + <testsuites> + <xsl:for-each select="//CUNIT_RUN_SUITE_SUCCESS"> + <xsl:variable name="suiteName" select="normalize-space(SUITE_NAME/text())"/> + <xsl:variable name="numberOfTests" select="count(CUNIT_RUN_TEST_RECORD/CUNIT_RUN_TEST_SUCCESS)"/> + <xsl:variable name="numberOfFailures" select="count(CUNIT_RUN_TEST_RECORD/CUNIT_RUN_TEST_FAILURE)"/> + <testsuite + name="{$suiteName}" + tests="{$numberOfTests}" + time="0" + failures="{$numberOfFailures}" + passed="1" + errors="2" + skipped="3"> + </testsuite> + </xsl:for-each> + </testsuites> +</xsl:template> +</xsl:stylesheet> +EOF