diff options
-rwxr-xr-x | TAO/examples/PluggableUDP/tests/Performance/run_test.pl | 39 |
1 files changed, 21 insertions, 18 deletions
diff --git a/TAO/examples/PluggableUDP/tests/Performance/run_test.pl b/TAO/examples/PluggableUDP/tests/Performance/run_test.pl index 3b8b2e0ce46..43b481a36b6 100755 --- a/TAO/examples/PluggableUDP/tests/Performance/run_test.pl +++ b/TAO/examples/PluggableUDP/tests/Performance/run_test.pl @@ -5,33 +5,36 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' # $Id$ # -*- perl -*- -unshift @INC, '../../../../../bin'; -require ACEutils; -require Process; +use lib '../../../../../bin'; +use PerlACE::Run_Test; $status = 0; -$iorfile = "test.ior"; +$iorfile = PerlACE::LocalFile ("test.ior"); unlink $iorfile; -$SV = Process::Create ($EXEPREFIX."server$EXE_EXT", "-o $iorfile -ORBendpoint diop://:12345"); -if (ACE::waitforfile_timed ($iorfile, 5) == -1) { - print STDERR "ERROR: timedout waiting for file <$iorfile>\n"; - $SV->Kill (); $SV->TimedWait (1); - exit 1; +$SV = new PerlACE::Process ("server", "-ORBEndpoint diop://:12345 -o $iorfile"); +$CL = new PerlACE::Process ("client", "-k file://$iorfile"); + +$SV->Spawn (); + +if (PerlACE::waitforfile_timed ($iorfile, 10) == -1) { + print STDERR "ERROR: could not find file <$iorfile>\n"; + $SV->Kill (); + exit 1; } -$client = Process::Create ($EXEPREFIX."client$EXE_EXT", "-k file://$iorfile"); -if ($client->TimedWait (120) == -1) { - print STDERR "ERROR: client timedout\n"; - $status = 1; - $client->Kill (); $client->TimedWait (1); +$client = $CL->SpawnWaitKill (90); +if ($client != 0) { + print STDERR "ERROR: client returned $client\n"; + $status = 1; } -if ($SV->TimedWait (1) == -1) { - print STDERR "ERROR: cannot terminate the server\n"; - $SV->Kill (); $SV->TimedWait (1); - $status = 1; +$server = $SV->WaitKill (10); + +if ($server != 0) { + print STDERR "ERROR: server returned $server\n"; + $status = 1; } unlink $iorfile; |