summaryrefslogtreecommitdiff
path: root/.gitlab-ci/simple-junit-report.sh
blob: 120c325f116761414316513f540f437b0a7c7277 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
OUTFILE=$1
NAME=$2
MESSAGE=$3

cat >$OUTFILE <<EOF
<?xml version='1.0' encoding='utf-8'?>
<testsuites tests="1" errors="0" failures="1">
  <testsuite name="tracker" tests="1" errors="0" failures="1">
    <testcase name="$NAME" classname="tracker">
      <failure message="$MESSAGE"/>
    </testcase>
  </testsuite>
</testsuites>
EOF

# Also echo the message in stdout for good measure
echo $MESSAGE