From c9bc14a22200252884451a19fdaa2cb292b93645 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 25 Feb 2002 12:45:20 +0000 Subject: use the pid file, use the automake subdir --- tests/Makefile.am | 8 +++++--- tests/runtests.pl | 8 ++++++-- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/tests/Makefile.am b/tests/Makefile.am index 5205ad80f..6d8aff3ea 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -2,7 +2,7 @@ EXTRA_DIST = ftpserver.pl httpserver.pl httpsserver.pl runtests.pl \ ftpsserver.pl stunnel.pm getpart.pm FILEFORMAT README \ stunnel.pem -SUBDIRS = data +SUBDIRS = data server PERLFLAGS = -I$(srcdir) @@ -12,11 +12,11 @@ install: curl: @(cd ..; make) -test: +test: server/sws @cd data && exec $(MAKE) test srcdir=$(srcdir) $(PERL) $(PERLFLAGS) $(srcdir)/runtests.pl -quiet-test: +quiet-test: server/sws @cd data && exec $(MAKE) test srcdir=$(srcdir) $(PERL) $(PERLFLAGS) $(srcdir)/runtests.pl -s -a @@ -24,3 +24,5 @@ clean: rm -rf log find . -name "*~" | xargs rm -f +server/sws: + cd server; make sws diff --git a/tests/runtests.pl b/tests/runtests.pl index 4d18268d6..b88988ac7 100755 --- a/tests/runtests.pl +++ b/tests/runtests.pl @@ -140,14 +140,18 @@ sub runhttpserver { my $RUNNING; my $pid; + $pid = checkserver ($HTTPPIDFILE); + # verify if our/any server is running on this port my $data=`$CURL --silent -i $HOSTIP:$HOSTPORT/verifiedserver`; if ( $data =~ /WE ROOLZ(: |)(\d*)/ ) { - $pid = 0+$2; + if($2) { + $pid = 0+$2; + } if(!$pid) { - print "Test server already running with unkown pid! Use it...\n"; + print "Test server already running with unknown pid! Use it...\n"; return; } -- cgit v1.2.3