diff options
Diffstat (limited to 'TAO/tests/NestedUpcall/MT_Client_Test/run_test.pl')
-rwxr-xr-x | TAO/tests/NestedUpcall/MT_Client_Test/run_test.pl | 50 |
1 files changed, 11 insertions, 39 deletions
diff --git a/TAO/tests/NestedUpcall/MT_Client_Test/run_test.pl b/TAO/tests/NestedUpcall/MT_Client_Test/run_test.pl index 48e71e1d4db..77ec0121e15 100755 --- a/TAO/tests/NestedUpcall/MT_Client_Test/run_test.pl +++ b/TAO/tests/NestedUpcall/MT_Client_Test/run_test.pl @@ -16,52 +16,24 @@ $ior2file = "server2.ior"; unlink $ior1file; unlink $ior2file; -$SV1 = Process::Create ($EXEPREFIX."server".$EXE_EXT, +$SV1 = Process::Create ($EXEPREFIX."server".$Process::EXE_EXT, " -o $ior1file "); -if (ACE::waitforfile_timed ($ior1file, 5) == -1) { - print STDERR "ERROR: cannot find file <$ior1file>\n"; - $SV1->Kill (); $SV1->TimedWait (1); - exit 1; -} - -$SV2 = Process::Create ($EXEPREFIX."server".$EXE_EXT, +$SV2 = Process::Create ($EXEPREFIX."server".$Process::EXE_EXT, " -o $ior2file "); -if (ACE::waitforfile_timed ($ior2file, 5) == -1) { - print STDERR "ERROR: cannot find file <$ior1file>\n"; - $SV2->Kill (); $SV2->TimedWait (1); - exit 1; -} - -$CL = Process::Create ($EXEPREFIX."client".$EXE_EXT, - " -f $ior1file -g $ior2file -n 2 -i 10 -s 5"); +ACE::waitforfile ($ior1file); +ACE::waitforfile ($ior2file); -$client = $CL->TimedWait (60); -if ($client == -1) { - print STDERR "ERROR: client timedout\n"; - $CL->Kill (); $CL->TimedWait (1); -} +$status = system ($EXEPREFIX."client".$Process::EXE_EXT. + " -f $ior1file -g $ior2file -n 2 -i 10 -s 5"); -$SV1->Terminate (); $server1 = $SV1->TimedWait (5); -if ($server1 == -1) { - print STDERR "ERROR: cannot terminate server1\n"; - $SV1->Kill (); $SV1->TimedWait (1); - $SV2->Kill (); $SV2->TimedWait (1); -} +$SV1->Kill (); $SV1->Wait (); +$SV2->Kill (); $SV2->Wait (); -$SV2->Terminate (); $server1 = $SV2->TimedWait (5); -if ($server2 == -1) { - print STDERR "ERROR: cannot terminate server2\n"; - $SV2->Kill (); $SV2->TimedWait (1); -} - -# Clean up +#clean up unlink $ior1file; unlink $ior2file; -if ($client == -1 || $server1 == -1 || $server2 == -1) { - exit 1; -} - -exit 0; +# @@ Capture any errors from the server too. +exit $status; |