Merge pull request #2309 from mitza-oci/warnings
[ACE_TAO.git] / TAO / tests / Portable_Interceptors / ForwardRequest / run_test.pl
blob53546e1ca51ee3b5d58d30b57d3bacfd1fad53ae
1 eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
2 & eval 'exec perl -S $0 $argv:q'
3 if 0;
5 # -*- perl -*-
9 use lib "$ENV{ACE_ROOT}/bin";
10 use PerlACE::TestTarget;
12 my $server = PerlACE::TestTarget::create_target (1) || die "Create target 1 failed\n";
13 my $client = PerlACE::TestTarget::create_target (2) || die "Create target 2 failed\n";
15 my $iorbase1 = "test1.ior";
16 my $iorbase2 = "test2.ior";
18 my $server1_iorfile = $server->LocalFile ($iorbase1);
19 my $server2_iorfile = $server->LocalFile ($iorbase2);
20 my $client1_iorfile = $client->LocalFile ($iorbase1);
21 my $client2_iorfile = $client->LocalFile ($iorbase2);
23 $server->DeleteFile ($iorbase1);
24 $server->DeleteFile ($iorbase2);
25 $client->DeleteFile ($iorbase1);
26 $client->DeleteFile ($iorbase2);
28 my $SV = $server->CreateProcess ("server", "-o $server1_iorfile -o $server2_iorfile");
29 my $CL = $client->CreateProcess ("client", "-k file://$client1_iorfile -k file://$client2_iorfile");
31 $status = 0;
33 print STDERR "\n\n==== Running PortableInterceptor::ForwardRequest test\n";
35 $SV->Spawn ();
37 if ($server->WaitForFileTimed ($iorbase1,
38 $server->ProcessStartWaitInterval()) == -1) {
39 print STDERR "ERROR: cannot find file <$server1_iorfile>\n";
40 $SV->Kill (); $SV->TimedWait (1);
41 exit 1;
44 if ($server->WaitForFileTimed ($iorbase2,
45 $server->ProcessStartWaitInterval()) == -1) {
46 print STDERR "ERROR: cannot find file <$server2_iorfile>\n";
47 $SV->Kill (); $SV->TimedWait (1);
48 exit 1;
51 $client_status = $CL->SpawnWaitKill ($client->ProcessStartWaitInterval());
53 if ($client_status != 0) {
54 print STDERR "ERROR: client returned $client_status\n";
55 $status = 1;
58 $server_status = $SV->WaitKill ($server->ProcessStopWaitInterval());
60 if ($server_status != 0) {
61 print STDERR "ERROR: server returned $server_status\n";
62 $status = 1;
65 $server->DeleteFile ($iorbase1);
66 $server->DeleteFile ($iorbase2);
67 $client->DeleteFile ($iorbase1);
68 $client->DeleteFile ($iorbase2);
70 exit $status;