LOCAL_MPD=''
mpdtrace >/dev/null 2>&1
- if [ "$?" != 0 ]; then
+ if [ "$?" -ne 0 ]; then
LOCAL_MPD='1'
mpd & # start an mpd instance
sleep 1 # give mpd some time to start up
fi # otherwise there is an mpd instance already running
- mpiexec -n 1 nosetests --with-doctest --doctest-tests pysawsim || exit 1
+ mpiexec -n 1 nosetests --with-doctest --doctest-tests pysawsim
+ RESULT="$?"
if [ -n "$LOCAL_MPD" ]; then
mpdallexit
fi
+ if [ "$RESULT" -ne 0 ]; then
+ exit 1;
+ fi
+
else # no MPD
nosetests --with-doctest --doctest-tests pysawsim || exit 1