diff options
Diffstat (limited to 'TAO/examples/Simple/time-date/run_test.pl')
-rwxr-xr-x | TAO/examples/Simple/time-date/run_test.pl | 35 |
1 files changed, 19 insertions, 16 deletions
diff --git a/TAO/examples/Simple/time-date/run_test.pl b/TAO/examples/Simple/time-date/run_test.pl index 038a97933a2..5fc9d903b85 100755 --- a/TAO/examples/Simple/time-date/run_test.pl +++ b/TAO/examples/Simple/time-date/run_test.pl @@ -6,34 +6,37 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' # -*- perl -*- use lib "../../../../bin"; -use PerlACE::Run_Test; +require ACEutils; +require Process; $status = 0; -$iorfile = PerlACE::LocalFile ("timedate.ior"); -$conf = PerlACE::LocalFile ("client.conf"); +$iorfile = "./ior"; # Remove the file before starting the test. unlink $iorfile; -$SV = new PerlACE::Process ("server"); -$CL = new PerlACE::Process ("client", "-f $iorfile -ORBSvcConf $conf"); +$SV = Process::Create ($EXEPREFIX."server$EXE_EXT", ""); -$SV->Spawn (); - -if (PerlACE::waitforfile_timed ($iorfile, 5) == -1) { - print STDERR "ERROR: waiting for file <$iorfile>\n"; - $SV->Kill (); - exit 1; +if (ACE::waitforfile_timed ($iorfile, 5) == -1) { + print STDERR "ERROR: timedout waiting for file <$iorfile>\n"; + $SV->Kill (); $SV->TimedWait (1); + exit 1; } -$client = $CL->SpawnWaitKill (60); +$CL = Process::Create ($EXEPREFIX."client$EXE_EXT", + "-f $iorfile -ORBSkipServiceConfigOpen"); -if ($client != 0) { - print STDERR "ERROR: client returned $client\n"; - $status = 1; +if ($CL->TimedWait (60) == -1) { + print STDERR "ERROR: client timedout\n"; + $status = 1; + $CL->Kill (); $CL->TimedWait (1); } -$SV->Kill (); +$SV->Terminate (); if ($SV->TimedWait (5) == -1) { + print STDERR "ERROR: cannot terminate the server\n"; + $SV->Kill (); $SV->TimedWait (1); + $status = 1; +} unlink $iorfile; |