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 my $server1 = PerlACE
::TestTarget
::create_target
(1) || die "Create target 1 failed\n";
20 my $server2 = PerlACE
::TestTarget
::create_target
(2) || die "Create target 2 failed\n";
21 my $client = PerlACE
::TestTarget
::create_target
(3) || die "Create target 3 failed\n";
23 my $ior1file = "ifr.ior";
25 #Files which used by server1
26 my $server1_ior1file = $server1->LocalFile ($ior1file);
27 $server1->DeleteFile($ior1file);
29 #Files which used by server2
30 my $server2_ior1file = $server2->LocalFile ($ior1file);
31 $server2->DeleteFile($ior1file);
33 #Files which used by client
34 my $client_ior1file = $client->LocalFile ($ior1file);
35 $client->DeleteFile($ior1file);
38 $SV1 = $server1->CreateProcess ("$ENV{TAO_ROOT}/orbsvcs/IFR_Service/tao_ifr_service",
39 "-ORBdebuglevel $debug_level " .
40 "-o $server1_ior1file");
42 $SV2 = $server2->CreateProcess ("$ENV{ACE_ROOT}/bin/tao_ifr",
43 "-ORBdebuglevel $debug_level " .
44 "-ORBInitRef InterfaceRepository=file://$server1_ior1file test.idl");
46 $CL = $client->CreateProcess ("test_idl",
47 "-i file://$client_ior1file ");
49 print STDERR
"\n\n==== Running Forward Declared ValueType Definition test\n";
51 print STDERR
"Starting IFR Service\n";
53 $server_status = $SV1->Spawn ();
55 if ($server_status != 0) {
56 print STDERR
"ERROR: server returned $server_status\n";
60 if ($server1->WaitForFileTimed ($ior1file,
61 $server1->ProcessStartWaitInterval()) == -1) {
62 print STDERR
"ERROR: cannot find file <$server1_ior1file>\n";
63 $SV1->Kill (); $SV1->TimedWait (1);
67 if ($server1->GetFile ($ior1file) == -1) {
68 print STDERR
"ERROR: cannot retrieve file <$server1_ior1file>\n";
69 $SV1->Kill (); $SV1->TimedWait (1);
73 if ($server2->PutFile ($ior1file) == -1) {
74 print STDERR
"ERROR: cannot set file <$server2_ior1file>\n";
75 $SV1->Kill (); $SV1->TimedWait (1);
79 if ($client->PutFile ($ior1file) == -1) {
80 print STDERR
"ERROR: cannot set file <$client_ior1file>\n";
81 $SV1->Kill (); $SV1->TimedWait (1);
85 print STDERR
"Loading test.idl into IFR service\n";
87 $server_status = $SV2->SpawnWaitKill ($server2->ProcessStartWaitInterval());
89 if ($server_status != 0) {
90 print STDERR
"ERROR: server returned $server_status\n";
94 print STDERR
"Running test_idl\n";
96 $client_status = $CL->SpawnWaitKill ($client->ProcessStartWaitInterval());
98 if ($client_status != 0) {
99 print STDERR
"ERROR: client returned $client_status\n";
103 print STDERR
"Stopping IFR\n";
105 $SV1->Kill(); $SV1->TimedWait (1);
107 $server1->DeleteFile($ior1file);
108 $server2->DeleteFile($ior1file);
109 $client->DeleteFile($ior1file);