1 eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
2 & eval 'exec perl -S $0 $argv:q'
7 use lib
"$ENV{ACE_ROOT}/bin";
8 use PerlACE
::TestTarget
;
12 $dotted_decimal_addresses = '1';
20 # We want the server to run on a fixed port
21 $port = PerlACE
::uniqueid
() + 10001; # This can't be 10000 for Chorus 4.0
23 my $server = PerlACE
::TestTarget
::create_target
(1) || die "Create target 1 failed\n";
24 my $client = PerlACE
::TestTarget
::create_target
(2) || die "Create target 2 failed\n";
26 my $iorbase = "server.ior";
27 my $server_iorfile = $server->LocalFile ($iorbase);
28 $server->DeleteFile($iorbase);
30 $SV = $server->CreateProcess ("server",
31 "-ORBdebuglevel $debug_level " .
32 "-ORBEndpoint iiop://:$port " .
33 "-o $server_iorfile " .
34 "-ORBDottedDecimalAddresses $dotted_decimal_addresses ");
36 $hostname = $server->HostName();
38 $CL = $client->CreateProcess ("client",
39 "-k corbaloc::$hostname:$port/collocated_ior_bound_in_remote_iortable " .
40 "-ORBCollocationStrategy thru_poa " .
41 "-ORBDottedDecimalAddresses $dotted_decimal_addresses ");
43 $server_status = $SV->Spawn ();
45 if ($server_status != 0) {
46 print STDERR
"ERROR: server returned $server_status\n";
50 if ($server->WaitForFileTimed ($iorbase,
51 $server->ProcessStartWaitInterval()) == -1) {
52 print STDERR
"ERROR: cannot find file <$server_iorfile>\n";
53 $SV->Kill (); $SV->TimedWait (1);
57 $client_status = $CL->SpawnWaitKill ($client->ProcessStartWaitInterval() + 45);
59 if ($client_status != 0) {
60 print STDERR
"ERROR: Bug 2289 Regression failed. Client returned $client_status\n";
64 $server_status = $SV->TerminateWaitKill ($server->ProcessStopWaitInterval());
67 if ($server_status != 0) {
68 print STDERR
"ERROR: server returned $server_status\n";
72 $server->DeleteFile($iorbase);
73 $client->DeleteFile($iorbase);