# # patch "ChangeLog" # from [395776a7bab856a184a690a042895ea90144f8a5] # to [5d6d879c33492aad3c353e714495c619b7b79c83] # # patch "testsuite.at" # from [ba4c8f075ffc9901c34429f102f05e9703f251d3] # to [2c6c52294b3e4f89a0b7d917d732a83ab6ee99ac] # --- ChangeLog +++ ChangeLog @@ -1,3 +1,7 @@ +2005-05-09 Matthew Gregan + + * testsuite.at: Revert bogus changes committed in revision 9d478. + 2005-05-09 Matt Johnston * commands.cc (pid_file): use fs::path .empty() rather than ==, since --- testsuite.at +++ testsuite.at @@ -334,32 +334,55 @@ m4_define([MONOTONE3], MONOTONE --db=test3.db) m4_define([NETSYNC_KILL], [ +# kill last seen pid if there is no pid file (needed for cases where +# NETSYNC_KILL{,HARD} is used more than once on a single process. +if test -e monotone_at.pid; then + mt_pid=`cat monotone_at.pid` +fi if test "$OSTYPE" == "msys"; then - ps |awk -- '{p=$NF;a=1;if(p=="COMMAND")next;pp=split(p,ps,"/");if(ps[[pp]]=="monotone")system("kill " $a);}' - # MinGW has no killall. The weird a=1 thing is to avoid autotest treating $1 as its own parameter + # we can't use MingW's kill because it can't target Win32 pids. + pskill=`which pskill` + if test $pskill && test -x $pskill; then + $pskill $mt_pid 2>/dev/null + else + ps | awk -- '{p=$NF;a=1;if(p=="COMMAND")next;pp=split(p,ps,"/");if(ps[[pp]]=="monotone")system("kill " $a);}' + fi else - killall monotone 2>/dev/null + kill $mt_pid 2>/dev/null fi +rm -f monotone_at.pid 2>/dev/null ]) m4_define([NETSYNC_KILLHARD], [ +# kill last seen pid if there is no pid file (needed for cases where +# NETSYNC_KILL{,HARD} is used more than once on a single process. +if test -e monotone_at.pid; then + mt_pid=`cat monotone_at.pid` +fi if test "$OSTYPE" == "msys"; then - ps |awk -- '{p=$NF;a=1;if(p=="COMMAND")next;pp=split(p,ps,"/");if(ps[[pp]]=="monotone")system("kill -KILL " $a);}' + # we can't use MingW's kill because it can't target Win32 pids. + pskill=`which pskill` + if test $pskill && test -x $pskill; then + $pskill $mt_pid 2>/dev/null + else + ps | awk -- '{p=$NF;a=1;if(p=="COMMAND")next;pp=split(p,ps,"/");if(ps[[pp]]=="monotone")system("kill -KILL" $a);}' + fi else - killall -KILL monotone 2>/dev/null + kill -KILL $mt_pid 2>/dev/null fi +rm -f monotone_at.pid 2>/dev/null ]) # run as NETSYNC_SERVE_N_START(2|3, collection name) # note that NETSYNC_SERVE_START is _not_ a special case of this macro. m4_define([NETSYNC_SERVE_N_START], [ NETSYNC_KILLHARD -MONOTONE --db=test$1.db --rcfile=netsync.lua serve localhost:$_PORT $2 & +MONOTONE --db=test$1.db --rcfile=netsync.lua --pid-file=monotone_at.pid serve localhost:$_PORT $2 & sleep 4 ]) # run as NETSYNC_SERVE_START(collection name) m4_define([NETSYNC_SERVE_START], [ NETSYNC_KILLHARD -MONOTONE --rcfile=netsync.lua serve localhost:$_PORT $1 & +MONOTONE --rcfile=netsync.lua --pid-file=monotone_at.pid serve localhost:$_PORT $1 & sleep 4 ]) # run as NETSYNC_SERVE_STOP