misc/jenkins: unitrun handle classname
authorJean Privat <jean@pryen.org>
Tue, 2 Sep 2014 13:03:33 +0000 (09:03 -0400)
committerJean Privat <jean@pryen.org>
Fri, 26 Sep 2014 00:27:33 +0000 (20:27 -0400)
Signed-off-by: Jean Privat <jean@pryen.org>

misc/jenkins/unitrun.sh

index c652286..bb5b86e 100755 (executable)
@@ -29,9 +29,12 @@ shift
 /usr/bin/time -f%U -o "${name}.t.out" "$@" > >(tee "${name}.out") 2> >(tee "${name}.2.out" >&2)
 res=$?
 
+c=`echo "${name%-*}" | tr "-" "."`
+n=${name##*-}
+
 cat > "${name}.xml"<<END
 <testsuites><testsuite>
-<testcase classname='other' name='$name' time='`cat "${name}.t.out"`' timestamp='`date -Iseconds`'>
+<testcase classname='$c' name='$n' time='`cat "${name}.t.out"`' timestamp='`date -Iseconds`'>
 END
 if test "$res" != "0"; then
 echo >> "${name}.xml" "<error message='Command returned $res'/>"