File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,15 +5,19 @@ progdir=${0%/*}
55
66cd $progdir /.. # now at trunk/
77
8- test/test-setup # create a patched django for test purposes, and more
8+ pidfile=$( test/test-setup) # create a patched django for test purposes, and more
9+ [ " $pidfile " ] || die " Didn't get a pidfile name"
910
1011test/run-pyflakes ietf
1112
1213# Trap keyboard interrupt to ensure the test/teardown is run if we interrupt the tests
1314trap ' echo "$program($LINENO): Caught Interrupt"' INT
1415
1516# run tests with our patched django
16- PYTHONPATH=test:test/lib URLPREFIX=" $* " python ietf/manage.py test
17+ PYTHONPATH=test:test/lib URLPREFIX=" $* " python ietf/manage.py test &
18+ pid=$!
19+ echo $pid > $pidfile
20+ wait $pid
1721
1822# reset keyboard interrupt trap
1923trap INT
Original file line number Diff line number Diff line change @@ -66,18 +66,17 @@ while true; do
6666 echo " $$ " > $PIDFILE
6767 chmod a+rwx $LOCKDIR
6868 chmod a+rw $PIDFILE
69+ echo $PIDFILE # tell caller about the pidfile
6970 break
7071 else
7172 pid=$( < $PIDFILE )
7273 [ " $pid " ] || die " Couldn't read pidfile '$PIDFILE '"
7374 if kill -0 $pid ; then
74- echo " Pidfile for process $pid exists, and process is running. Sleeping."
75+ say " Pidfile for process $pid exists, and process is running. Sleeping."
7576 sleep 10
7677 else
77- echo " Pidfile for process $pid exists, but process isn't running."
78- echo " Removing lock and old pid file $pidfile ."
79- rm -rf $LOCKDIR
80- break
78+ say " Pidfile for process $pid exists, but process doesn't seem to be running."
79+ die " Remove lockdir $LOCKDIR and old pid file $pidfile ."
8180 fi
8281 fi
8382done
You can’t perform that action at this time.
0 commit comments