diff options
author | brunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2001-03-05 03:23:49 +0000 |
---|---|---|
committer | brunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2001-03-05 03:23:49 +0000 |
commit | 84fe5584b4e402d9c75973163ebd441032497744 (patch) | |
tree | 8bb327569be3f54d7ca99ad830c1c991170ea28d /TAO/examples/Logging/run_test.pl | |
parent | d39fec54c8f8f970b913d8fcc5d219532dc21cae (diff) | |
download | ATCD-84fe5584b4e402d9c75973163ebd441032497744.tar.gz |
ChangeLogTag:Sun Mar 4 19:12:59 2001 Darrell Brunsch <brunsch@uci.edu>
Diffstat (limited to 'TAO/examples/Logging/run_test.pl')
-rwxr-xr-x | TAO/examples/Logging/run_test.pl | 46 |
1 files changed, 21 insertions, 25 deletions
diff --git a/TAO/examples/Logging/run_test.pl b/TAO/examples/Logging/run_test.pl index 891abc3421f..58aac5eaaed 100755 --- a/TAO/examples/Logging/run_test.pl +++ b/TAO/examples/Logging/run_test.pl @@ -7,41 +7,37 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' # This is a Perl script that runs the Logger client and server -unshift @INC, '../../../bin'; -require Process; +use lib '../../../bin'; +use PerlACE::Run_Test; + +$status = 0; # amount of delay between running the servers $sleeptime = 7; -# Starts the Logging Service -sub service -{ - my $args = ""; - my $prog = $EXEPREFIX."Logging_Service" - .$EXE_EXT; - $SV = Process::Create ($prog, $args); -} - -# Starts the test client -sub test -{ - my $args = ""; - my $prog = $EXEPREFIX."Logging_Test".$EXE_EXT; - - system ("$prog $args"); -} +$SV = new PerlACE::Process ("Logging_Service"); +$CL = new PerlACE::Process ("Logging_Test"); # Start the service -service (); +$SV->Spawn (); # Give the service time to settle sleep $sleeptime; -# Start the client (which exits automatically) -test (); +# Start the client +$client = $CL->SpawnWaitKill (60); -# Give the client time to log and exit -sleep 3; +if ($client != 0) { + print STDERR "ERROR: test returned $client\n"; + $status = 1; +} # Kill the service -$SV->Kill (); +$server = $SV->TerminateWaitKill (5); + +if ($server != 0) { + print STDERR "ERROR: service returned $server\n"; + $status = 1; +} + +exit $status; |