Use start.pl and stop.pl to start and stop servers during test.

This commit is contained in:
Matt Nelson
2001-02-14 00:16:38 +00:00
parent a60a0fd346
commit 614610ba0b
3 changed files with 20 additions and 80 deletions

View File

@@ -15,7 +15,7 @@
# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
# $Id: tests.sh,v 1.12 2001/01/17 20:53:41 bwelling Exp $
# $Id: tests.sh,v 1.13 2001/02/14 00:16:34 nelsonm Exp $
SYSTEMTESTTOP=..
. $SYSTEMTESTTOP/conf.sh
@@ -30,38 +30,9 @@ if [ $ret != 0 ]; then
fi
status=`expr $status + $ret`
kill -TERM `cat lwresd1/lwresd.pid` > /dev/null 2>&1
if [ $? != 0 ]; then
echo "I:lwresd1 died before a SIGTERM was sent"
status=1
rm -f lwresd1/lwresd.pid
fi
sleep 5
if [ -f lwresd1/lwresd.pid ]; then
echo "I:lwresd1 didn't die when sent a SIGTERM"
kill -KILL `cat lwresd1/lwresd.pid` > /dev/null 2>&1
if [ $? != 0 ]; then
echo "I:lwresd1 died before a SIGKILL was sent"
status=1
rm -f lwresd1/lwresd.pid
fi
status=1
fi
$PERL $SYSTEMTESTTOP/stop.pl . lwresd1
(
cd lwresd1
$LWRESD -c lwresd.conf -d 99 -g >> lwresd.run 2>&1 &
x=0
while test ! -f lwresd.pid
do
x=`expr $x + 1`
if [ $x = 5 ]; then
echo "I:Couldn't start lwresd1"
exit 1
fi
sleep 1
done
)
$PERL $SYSTEMTESTTOP/start.pl . lwresd1 "-c lwresd.conf -d 99 -g"
echo "I:using lwresd.conf"
ret=0