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 $nice = "-ORBDottedDecimalAddresses 1";
18 for ($i = 0; $i <= $#ARGV; $i++) {
19 if ($ARGV[$i] eq "-d") {
22 elsif ($ARGV[$i] eq "-h") {
26 elsif ($ARGV[$i] eq "-i") {
27 $iterations = "-i ".$ARGV[$i + 1];
35 my $server = PerlACE
::TestTarget
::create_target
(1) || die "Create target 1 failed\n";
36 my $client = PerlACE
::TestTarget
::create_target
(2) || die "Create target 2 failed\n";
38 my $iorbase = "if_repo.ior";
39 my $server_iorfile = $server->LocalFile ($iorbase);
40 my $client_iorfile = $client->LocalFile ($iorbase);
41 $server->DeleteFile($iorbase);
42 $client->DeleteFile($iorbase);
44 $SV = $server->CreateProcess ("$ENV{TAO_ROOT}/orbsvcs/IFR_Service/tao_ifr_service",
46 " -o $server_iorfile");
48 $CL = $client->CreateProcess ("client",
49 "-ORBInitRef InterfaceRepository=file://$client_iorfile " .
50 " $debug $history $iterations");
52 $server_status = $SV->Spawn ();
54 if ($server_status != 0) {
55 print STDERR
"ERROR: server returned $server_status\n";
59 if ($server->WaitForFileTimed ($iorbase,
60 $server->ProcessStartWaitInterval()) == -1) {
61 print STDERR
"ERROR: cannot find file <$server_iorfile>\n";
62 $SV->Kill (); $SV->TimedWait (1);
66 if ($server->GetFile ($iorbase) == -1) {
67 print STDERR
"ERROR: cannot retrieve file <$server_iorfile>\n";
68 $SV->Kill (); $SV->TimedWait (1);
71 if ($client->PutFile ($iorbase) == -1) {
72 print STDERR
"ERROR: cannot set file <$client_iorfile>\n";
73 $SV->Kill (); $SV->TimedWait (1);
77 $client_status = $CL->SpawnWaitKill ($client->ProcessStartWaitInterval() + 45);
79 if ($client_status != 0) {
80 print STDERR
"ERROR: client returned $client_status\n";
84 $server_status = $SV->TerminateWaitKill ($server->ProcessStopWaitInterval());
86 if ($server_status != 0) {
87 print STDERR
"ERROR: server returned $server_status\n";
91 $server->DeleteFile($iorbase);
92 $client->DeleteFile($iorbase);