diff options
Diffstat (limited to 'TAO/orbsvcs/tests/CosEvent/Basic/run_test.pl')
-rwxr-xr-x | TAO/orbsvcs/tests/CosEvent/Basic/run_test.pl | 89 |
1 files changed, 39 insertions, 50 deletions
diff --git a/TAO/orbsvcs/tests/CosEvent/Basic/run_test.pl b/TAO/orbsvcs/tests/CosEvent/Basic/run_test.pl index 5f283075222..2f5ff8af44c 100755 --- a/TAO/orbsvcs/tests/CosEvent/Basic/run_test.pl +++ b/TAO/orbsvcs/tests/CosEvent/Basic/run_test.pl @@ -8,64 +8,53 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' # This is a Perl script that runs the client and all the other servers that # are needed -unshift @INC, '../../../../../bin'; -require ACEutils; -require Process; -require Uniqueid; -use Cwd; - -$cwd = getcwd(); -ACE::checkForTarget($cwd); +use lib '../../../../../bin'; +use PerlACE::Run_Test; $status = 0; -print STDERR "\n\nShutdown EC with clients still attached\n"; -$T = Process::Create ($EXEPREFIX . "Shutdown".$EXE_EXT); -if ($T->TimedWait (60) == -1) { - print STDERR "ERROR: Test timedout\n"; - $status = 1; - $T->Kill (); $T->TimedWait (1); -} +$svc_pull_conf = PerlACE::LocalFile ("svc.pull.conf"); -print STDERR "\n\nDisconnect callbacks test\n"; -$T = Process::Create ($EXEPREFIX . "Disconnect".$EXE_EXT); -if ($T->TimedWait (60) == -1) { - print STDERR "ERROR: Test timedout\n"; - $status = 1; - $T->Kill (); $T->TimedWait (1); -} +sub RunTest ($$$) +{ + my $message = shift; + my $program = shift; + my $arguments = shift; -print STDERR "\n\nMT Disconnects test\n"; -$T = Process::Create ($EXEPREFIX . "MT_Disconnect".$EXE_EXT); -if ($T->TimedWait (240) == -1) { - print STDERR "ERROR: Test timedout\n"; - $status = 1; - $T->Kill (); $T->TimedWait (1); -} + my $TEST = new PerlACE::Process ($program, $arguments); -print STDERR "\n\nPush Events\n"; -$T = Process::Create ($EXEPREFIX . "Push_Event".$EXE_EXT); -if ($T->TimedWait (60) == -1) { - print STDERR "ERROR: Test timedout\n"; - $status = 1; - $T->Kill (); $T->TimedWait (1); -} + print STDERR "\n\n$message\n"; + + my $test = $TEST->SpawnWaitKill (240); -print STDERR "\n\nPull-Push Events\n"; -$T = Process::Create ($EXEPREFIX . "Pull_Push_Event".$EXE_EXT, - " -ORBSvcConf $cwd$DIR_SEPARATOR" . "svc.pull.conf"); -if ($T->TimedWait (60) == -1) { - print STDERR "ERROR: Test timedout\n"; - $status = 1; - $T->Kill (); $T->TimedWait (1); + if ($test != 0) { + print STDERR "ERROR: Test returned $test\n"; + $status = 1; + } } -print STDERR "\n\nRandom\n"; -$T = Process::Create ($EXEPREFIX . "Random".$EXE_EXT); -if ($T->TimedWait (60) == -1) { - print STDERR "ERROR: Test timedout\n"; - $status = 1; - $T->Kill (); $T->TimedWait (1); -} +RunTest ("\n\nShutdown EC with clients still attached\n", + "Shutdown", + ""); + +RunTest ("\n\nDisconnect callbacks test\n", + "Disconnect", + ""); + +RunTest ("\n\nMT Disconnects test\n", + "MT_Disconnect", + ""); + +RunTest ("\n\nPush Events\n", + "Push_Event", + ""); + +RunTest ("\n\nPull-Push Events\n", + "Pull_Push_Event", + "-ORBSvcConf $svc_pull_conf"); + +RunTest ("\n\nRandom\n", + "Random", + ""); exit $status; |