summaryrefslogtreecommitdiffstats
path: root/tools/buildsteps/freebsd/run-tests
diff options
context:
space:
mode:
Diffstat (limited to 'tools/buildsteps/freebsd/run-tests')
-rw-r--r--tools/buildsteps/freebsd/run-tests14
1 files changed, 14 insertions, 0 deletions
diff --git a/tools/buildsteps/freebsd/run-tests b/tools/buildsteps/freebsd/run-tests
new file mode 100644
index 0000000..9ee91ce
--- /dev/null
+++ b/tools/buildsteps/freebsd/run-tests
@@ -0,0 +1,14 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=freebsd
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+cd $WORKSPACE/build;gmake -j$BUILDTHREADS kodi-test
+if [ "$Configuration" != "Coverage" ]; then
+ cd $WORKSPACE;build/kodi-test --gtest_output=xml:gtestresults.xml
+else
+ cd $WORKSPACE/build;GTEST_OUTPUT="xml:$WORKSPACE/gtestresults.xml" gmake coverage
+fi
+
+awk '{ if ($1 == "<testcase" && match($0, "notrun")) print substr($0,0,length($0)-2) "><skipped/></testcase>"; else print $0;}' gtestresults.xml > gtestresults-skipped.xml
+rm gtestresults.xml
+mv gtestresults-skipped.xml gtestresults.xml