projects
/
sawsim.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2192e9c
)
Also cleanup local mpd if the pysawsim nosetests fail.
author
W. Trevor King
<wking@drexel.edu>
Wed, 20 Oct 2010 19:57:45 +0000
(15:57 -0400)
committer
W. Trevor King
<wking@drexel.edu>
Wed, 20 Oct 2010 19:57:45 +0000
(15:57 -0400)
misc/hooks/pre-commit-pysawsim-check
patch
|
blob
|
history
diff --git
a/misc/hooks/pre-commit-pysawsim-check
b/misc/hooks/pre-commit-pysawsim-check
index 66a409dd42238ec912e5ccf2f9b79ff8a061520c..6e4f27b13965d8a89bfe81bbd5040e48dd1ced8f 100755
(executable)
--- a/
misc/hooks/pre-commit-pysawsim-check
+++ b/
misc/hooks/pre-commit-pysawsim-check
@@
-7,18
+7,23
@@
if [ -n "$HAS_MPD" ]; then
LOCAL_MPD=''
mpdtrace >/dev/null 2>&1
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
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 [ -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
else # no MPD
nosetests --with-doctest --doctest-tests pysawsim || exit 1