Skip to content

Commit 4cb27f5

Browse files
committed
Bah. Added 'pass' to have a function body.
- Legacy-Id: 793
1 parent 060f938 commit 4cb27f5

2 files changed

Lines changed: 10 additions & 7 deletions

File tree

test/run

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,19 @@ progdir=${0%/*}
55

66
cd $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

1011
test/run-pyflakes ietf
1112

1213
# Trap keyboard interrupt to ensure the test/teardown is run if we interrupt the tests
1314
trap '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
1923
trap INT

test/test-setup

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff 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
8382
done

0 commit comments

Comments
 (0)