diff options
Diffstat (limited to 'TAO/examples/POA/DSI/run_test.pl')
-rwxr-xr-x | TAO/examples/POA/DSI/run_test.pl | 46 |
1 files changed, 24 insertions, 22 deletions
diff --git a/TAO/examples/POA/DSI/run_test.pl b/TAO/examples/POA/DSI/run_test.pl index d6f3b2ff7bb..e0fae9a8394 100755 --- a/TAO/examples/POA/DSI/run_test.pl +++ b/TAO/examples/POA/DSI/run_test.pl @@ -5,38 +5,40 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' # $Id$ # -*- perl -*- -use lib '../../../../bin'; -use PerlACE::Run_Test; +unshift @INC, '../../../../bin'; +require ACEutils; -$status = 0; -$iorfile = PerlACE::LocalFile ("server.ior"); +$iorfile = "server.ior"; unlink $iorfile; -$SV = new PerlACE::Process ("server", "-f $iorfile"); -$CL = new PerlACE::Process ("client", "-f $iorfile -x"); +$SV = Process::Create ($EXEPREFIX."server$EXE_EXT", " -f $iorfile"); -$SV->Spawn (); - -if (PerlACE::waitforfile_timed ($iorfile, 5) == -1) { - print STDERR "ERROR: cannot find file <$iorfile>\n"; - $SV->Kill (); - exit 1; +if (ACE::waitforfile_timed ($iorfile, 5) == -1) { + print STDERR "ERROR: cannot find file <$iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; } -$client = $CL->SpawnWaitKill (60); -$server = $SV->WaitKill (5); +$CL = Process::Create ($EXEPREFIX."client$EXE_EXT ", + " -f $iorfile -x"); -unlink $iorfile; +$client = $CL->TimedWait (60); +if ($client == -1) { + print STDERR "ERROR: client timedout\n"; + $CL->Kill (); $CL->TimedWait (1); +} -if ($client != 0) { - print STDERR "ERROR: client returned $client\n"; - $status = 1; +$server = $SV->TimedWait (5); +if ($server == -1) { + print STDERR "ERROR: server timedout\n"; + $SV->Kill (); $SV->TimedWait (1); } + +unlink $iorfile; -if ($server != 0) { - print STDERR "ERROR: server returned $server\n"; - $status = 1; +if ($server != 0 || $client != 0) { + exit 1; } -exit $status; +exit 0; |