diff options
Diffstat (limited to 'TAO/tests/ORB_init/Portspan/run_test.pl')
-rwxr-xr-x | TAO/tests/ORB_init/Portspan/run_test.pl | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/TAO/tests/ORB_init/Portspan/run_test.pl b/TAO/tests/ORB_init/Portspan/run_test.pl new file mode 100755 index 00000000000..22184d41013 --- /dev/null +++ b/TAO/tests/ORB_init/Portspan/run_test.pl @@ -0,0 +1,44 @@ +# $Id$ + +eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' + & eval 'exec perl -S $0 $argv:q' + if 0; + +use lib "$ENV{ACE_ROOT}/bin"; +use PerlACE::Run_Test; +require ACEutils; + +$P1 = new PerlACE::Process("server", "-ORBEndpoint iiop://:5555/portspan=2"); +$P2 = new PerlACE::Process("server", "-ORBEndpoint iiop://:5555/portspan=2"); +$P3 = new PerlACE::Process("server", "-ORBEndpoint iiop://:5555/portspan=2"); +$test1 = $P1->Spawn(); +if ($test1 != 0) { + print STDERR "ERROR: Couldn't start first server. Err:$test1\n"; + $P1->Kill(); + exit 1; +} + +$test2 = $P2->Spawn(); +if ($test2 != 0) { + print STDERR "ERROR: Couldn't start second server. Err:$test2\n"; + $P1->Kill(); + $P2->Kill(); + exit 1; +} + +$test3 = $P3->SpawnWaitKill(5); +if ($test3 == 0) { + print STDERR "ERROR: Last server didn't fail! Err:$test3\n"; + $P1->Kill(); + $P2->Kill(); + $P3->Kill(); + exit 1; +} + +$P1->Kill(); +$P2->Kill(); +$P3->Kill(); + +print STDOUT "Portspan test completed successfully.\n"; + +exit 0; |