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
;
19 for ($i = 0; $i <= $#ARGV; $i++) {
20 if ($ARGV[$i] eq "-d") {
23 elsif ($ARGV[$i] eq "-t") {
24 $test = "-t ".$ARGV[$i + 1];
27 elsif ($ARGV[$i] eq "-i") {
28 $iterations = "-i ".$ARGV[$i + 1];
36 my $server = PerlACE
::TestTarget
::create_target
(1) || die "Create target 1 failed\n";
37 my $client = PerlACE
::TestTarget
::create_target
(2) || die "Create target 2 failed\n";
39 my $iorbase = "if_repo.ior";
40 my $server_iorfile = $server->LocalFile ($iorbase);
41 my $client_iorfile = $client->LocalFile ($iorbase);
42 $server->DeleteFile($iorbase);
43 $client->DeleteFile($iorbase);
45 $SV = $server->CreateProcess ("$ENV{TAO_ROOT}/orbsvcs/IFR_Service/tao_ifr_service",
47 " -o $server_iorfile " .
50 $CL = $client->CreateProcess ("IFR_Test",
51 "-ORBInitRef InterfaceRepository=file://$client_iorfile " .
52 " $debug $test $iterations");
54 $server_status = $SV->Spawn ();
56 if ($server_status != 0) {
57 print STDERR
"ERROR: server returned $server_status\n";
61 if ($server->WaitForFileTimed ($iorbase,
62 $server->ProcessStartWaitInterval()) == -1) {
63 print STDERR
"ERROR: cannot find file <$server_iorfile>\n";
64 $SV->Kill (); $SV->TimedWait (1);
68 if ($server->GetFile ($iorbase) == -1) {
69 print STDERR
"ERROR: cannot retrieve file <$server_iorfile>\n";
70 $SV->Kill (); $SV->TimedWait (1);
73 if ($client->PutFile ($iorbase) == -1) {
74 print STDERR
"ERROR: cannot set file <$client_iorfile>\n";
75 $SV->Kill (); $SV->TimedWait (1);
79 $client_status = $CL->SpawnWaitKill ($client->ProcessStartWaitInterval() + 45);
81 if ($client_status != 0) {
82 print STDERR
"ERROR: client returned $client_status\n";
86 $server_status = $SV->TerminateWaitKill ($server->ProcessStopWaitInterval());
88 if ($server_status != 0) {
89 print STDERR
"ERROR: server returned $server_status\n";
93 $server->DeleteFile($iorbase);
94 $client->DeleteFile($iorbase);