#!/bin/bash # this is just small wrapper to automate the unit testcases function emptylog() { FILENAME=$1 TESTCASE=$2 cat< $FILENAME Current testsuite crashes or wasnt in shape to be executed in development environment and this error message is placeholder. Fix your tests! EOF } TEST=$1 CURDIR=`pwd` DIRNAME=`dirname $TEST` BASENAME=`basename $TEST` QTESTLOG=./$BASENAME.log JUNITLOG=./$BASENAME.log.xml cd $DIRNAME LD_LIBRARY_PATH=../../lib ./$BASENAME -xml -o ./$BASENAME.log xsltproc --nonet ../qtestlib2junitxml.xsl $QTESTLOG > $JUNITLOG EXIT_CODE=$? case "$EXIT_CODE" in "0") echo success ;; *) echo error: unittest $BASENAME failed with $EXIT_CODE errors emptylog $JUNITLOG $BASENAME ;; esac cd $CURDIR exit $EXIT_CODE