diff options
-rwxr-xr-x | TAO/examples/POA/Explicit_Activation/run_test.pl | 68 |
1 files changed, 60 insertions, 8 deletions
diff --git a/TAO/examples/POA/Explicit_Activation/run_test.pl b/TAO/examples/POA/Explicit_Activation/run_test.pl index 18df6a4317a..7006effaafc 100755 --- a/TAO/examples/POA/Explicit_Activation/run_test.pl +++ b/TAO/examples/POA/Explicit_Activation/run_test.pl @@ -59,20 +59,72 @@ unlink $iorfile_1; unlink $iorfile_2; unlink $iorfile_3; + $SV = Process::Create ($EXEPREFIX."server$Process::EXE_EXT", "-f $iorfile $extra_args"); -ACE::waitforfile ($iorfile_1); -ACE::waitforfile ($iorfile_2); -ACE::waitforfile ($iorfile_3); +if (ACE::waitforfile_timed ($iorfile_1, 5) == -1) { + print STDERR "ERROR: cannot find file <$iorfile_1>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} + +if (ACE::waitforfile_timed ($iorfile_2, 5) == -1) { + print STDERR "ERROR: cannot find file <$iorfile_2>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} + +if (ACE::waitforfile_timed ($iorfile_3, 5) == -1) { + print STDERR "ERROR: cannot find file <$iorfile_3>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; +} + +$CL_1 = Process::Create ("../Generic_Servant/client$Process::EXE_EXT ", + " $extra_args $oneway -i $iterations -f $iorfile_1"); +$CL_2 = Process::Create ("../Generic_Servant/client$Process::EXE_EXT ", + " $extra_args $oneway -i $iterations -f $iorfile_2"); +$CL_3 = Process::Create ("../Generic_Servant/client$Process::EXE_EXT ", + " $extra_args $oneway -i $iterations -f $iorfile_3 -x"); + + +$client_1 = $CL_1->TimedWait (60); +if ($client_1 == -1) { + print STDERR "ERROR: client 1 timedout\n"; + $CL_1->Kill (); $CL_1->TimedWait (1); +} + +$client_2 = $CL_2->TimedWait (60); +if ($client_2 == -1) { + print STDERR "ERROR: client 2 timedout\n"; + $CL_2->Kill (); $CL_2->TimedWait (1); +} + +$client_3 = $CL_3->TimedWait (60); +if ($client_3 == -1) { + print STDERR "ERROR: client 3 timedout\n"; + $CL_3->Kill (); $CL_3->TimedWait (1); +} + -$status = system ("../Generic_Servant/client$Process::EXE_EXT $extra_args $oneway -i $iterations -f $iorfile_1"); -$status = system ("../Generic_Servant/client$Process::EXE_EXT $extra_args $oneway -i $iterations -f $iorfile_2"); -$status = system ("../Generic_Servant/client$Process::EXE_EXT $extra_args $oneway -i $iterations -f $iorfile_3 -x"); +$server = $SV->TimedWait (5); +if ($server == -1) { + print STDERR "ERROR: server timedout\n"; + $SV->Kill (); $SV->TimedWait (1); +} unlink $iorfile_1; unlink $iorfile_2; unlink $iorfile_3; -$SV->Wait (); +if ($server != 0 || + $client_1 != 0 || + $client_2 != 0 || + $client_3 != 0) +{ + exit 1; +} + +exit 0; + -exit $status; |