From: yoe Date: Mon, 6 Nov 2006 17:13:16 +0000 (+0000) Subject: r219: Support checking on devel builds, too. X-Git-Url: http://git.alex.org.uk r219: Support checking on devel builds, too. --- diff --git a/simple_test b/simple_test index 06af876..3432592 100755 --- a/simple_test +++ b/simple_test @@ -7,9 +7,17 @@ tmpnam=`mktemp` dd if=/dev/zero of=$tmpnam bs=1024 count=1024 ./nbd-server -C /dev/null -p ./nbd-server.pid 11111 $tmpnam & +# -p only works if nbd-server wasn't compiled with -DNOFORK or -DNODAEMON, +# which I sometimes do for testing and debugging. +PID=$! sleep 1 ./nbd-tester-client localhost 11111 retval=$? -kill `cat nbd-server.pid` +if [ -f nbd-server.pid ] +then + kill `cat nbd-server.pid` +else + kill $PID +fi rm -f nbd-server.pid exit $retval