diff options
Diffstat (limited to 'TAO/tests/Portable_Interceptors/Dynamic/run_test.pl')
-rwxr-xr-x | TAO/tests/Portable_Interceptors/Dynamic/run_test.pl | 53 |
1 files changed, 23 insertions, 30 deletions
diff --git a/TAO/tests/Portable_Interceptors/Dynamic/run_test.pl b/TAO/tests/Portable_Interceptors/Dynamic/run_test.pl index e588c46209d..43c9f86a683 100755 --- a/TAO/tests/Portable_Interceptors/Dynamic/run_test.pl +++ b/TAO/tests/Portable_Interceptors/Dynamic/run_test.pl @@ -5,48 +5,41 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' # $Id$ # -*- perl -*- -unshift @INC, '../../../../bin'; -require Process; -require ACEutils; -use Cwd; +use lib '../../../../bin'; +use PerlACE::Run_Test; -$cwd = getcwd(); -ACE::checkForTarget($cwd); - -print STDERR "\n\n==== Running interceptor Dynamic test\n"; - -$file = "$cwd$DIR_SEPARATOR" . "test.ior"; +$status = 0; +$file = PerlACE::LocalFile ("test.ior"); unlink $file; -$SV = Process::Create ($EXEPREFIX."server".$EXE_EXT, - "-ORBobjrefstyle url -o $file"); -if (ACE::waitforfile_timed ($file, 15) == -1) { - print STDERR "ERROR: cannot find file <$file>\n"; - $SV->Kill (); $SV->TimedWait (1); - exit 1; -} +$SV = new PerlACE::Process ("server", "-ORBobjrefstyle url -o $file"); +$CL = new PerlACE::Process ("client", "-ORBobjrefstyle url -f file://$file"); -$CL = Process::Create ($EXEPREFIX."client".$EXE_EXT, - "-ORBobjrefstyle url -f file://$file"); +print STDERR "\n\n==== Running interceptor Dynamic test\n"; +$SV->Spawn (); -$client = $CL->TimedWait (60); -if ($client == -1) { - print STDERR "ERROR: client timedout\n"; - $CL->Kill (); $CL->TimedWait (1); +if (PerlACE::waitforfile_timed ($file, 15) == -1) { + print STDERR "ERROR: cannot find file <$file>\n"; + $SV->Kill (); + exit 1; } -$server = $SV->TimedWait (5); -if ($server == -1) { - print STDERR "ERROR: server timedout\n"; - $SV->Kill (); $SV->TimedWait (1); +$client = $CL->SpawnWaitKill (60); + +if ($client != 0) { + print STDERR "ERROR: client returned $client\n"; + $status = 1; } -if ($client == -1 || $server == -1) { - exit 1; +$server = $SV->WaitKill (5); + +if ($server != 0) { + print STDERR "ERROR: server returned $server\n"; + $status = 1; } unlink $file; -exit 0; +exit $status; |