/[zanavi_public1]/navit/ci/junit_add.sh
ZANavi

Contents of /navit/ci/junit_add.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 50 - (show annotations) (download) (as text)
Wed Jun 22 07:33:35 2016 UTC (7 years, 9 months ago) by zoff99
File MIME type: application/x-sh
File size: 771 byte(s)
v2.0.51
1 #!/bin/bash
2
3 xml="$1"
4
5 tests_res="$2" # 0 -> ok, 1 -> fail, (2 -> skipped)
6
7 tests_name="$3"
8 tests_header="$4"
9 tests_message="$5"
10 tests_rtime="$6"
11
12 tests_name=`echo "$tests_name" | tr '<"> \\&' '_'`
13 tests_header=`echo "$tests_header" | tr '<"> \\&' '_'`
14 tests_message=`echo "$tests_message" | tr '<"> \\&' '_'`
15 tests_rtime=`echo "$tests_rtime" | tr '<"> \\&' '_'`
16
17
18 if [ "$tests_res""x" == "0x" ]; then
19
20 echo ' <testcase classname="JUnitXmlReporter.constructor" name="'"$tests_name"'" time="'"$tests_rtime"'" />' >> "$xml"
21
22 else
23
24 echo ' <testcase classname="JUnitXmlReporter.constructor" name="'"$tests_name"'" time="'"$tests_rtime"'">
25 <failure message="'"$tests_header"'">'"$tests_message"'</failure>
26 </testcase>' >> "$xml"
27
28 fi
29
30

   
Visit the ZANavi Wiki