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: 2753bf70ba928c3f6a2d53743d88f562b989c041 **/ scripts/shipabble-stats.sh | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100755 scripts/shipabble-stats.sh
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