Merge pull request #1844 from jrw972/monterey
[ACE_TAO.git] / TAO / tests / ORB_init / Portspan / run_test.pl
blob548f79f86636bc4aaf606ed5db84bb0caf9954e5
1 eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
2 & eval 'exec perl -S $0 $argv:q'
3 if 0;
5 # -*- perl -*-
7 use lib "$ENV{ACE_ROOT}/bin";
8 use PerlACE::TestTarget;
10 $status = 0;
12 my $server = PerlACE::TestTarget::create_target (1) || die "Create target 1 failed\n";
14 $port = $server->RandomPort ();
16 $SV1 = $server->CreateProcess ("server", "-ORBEndpoint iiop://:$port/portspan=2");
17 $SV2 = $server->CreateProcess ("server", "-ORBEndpoint iiop://:$port/portspan=2");
18 $SV3 = $server->CreateProcess ("server", "-ORBEndpoint iiop://:$port/portspan=2");
20 $server_status = $SV1->Spawn ();
22 if ($server_status != 0) {
23 print STDERR "ERROR: server returned $server_status\n";
24 exit 1;
27 $server_status = $SV2->Spawn ();
29 if ($server_status != 0) {
30 print STDERR "ERROR: server returned $server_status\n";
31 $SV1->Kill ();
32 exit 1;
35 $server_status = $SV3->Spawn ();
36 if ($server_status == 0) {
37 print STDERR "ERROR: Last server didn't fail! Err:$server_status\n";
38 $SV1->Kill ();
39 $SV2->Kill ();
40 $SV3->Kill ();
41 exit 1;
44 $SV1->Kill();
45 $SV2->Kill();
46 $SV3->Kill();
48 print STDOUT "Portspan test completed successfully.\n";
50 exit $status;