Changes to attempt to silence bcc64x
[ACE_TAO.git] / TAO / orbsvcs / tests / Bug_2709_Regression / run_test.pl
blobe7b8fbbf3fad03293209d853b4296d64945c22f4
1 eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
2 & eval 'exec perl -S $0 $argv:q'
3 if 0;
5 # -*- perl -*-
7 use lib "$ENV{ACE_ROOT}/bin";
8 use PerlACE::TestTarget;
10 $status = 0;
11 $debug_level = '0';
13 foreach $i (@ARGV) {
14 if ($i eq '-debug') {
15 $debug_level = '10';
19 my $server = PerlACE::TestTarget::create_target (1) || die "Create target 1 failed\n";
20 my $client = PerlACE::TestTarget::create_target (2) || die "Create target 2 failed\n";
22 my $iorbase = "ior.ior";
23 my $colloc_iorfile = "collocated_server.ior";
25 my $server_iorfile = $server->LocalFile ($iorbase);
26 my $client_iorfile = $client->LocalFile ($iorbase);
28 my $client_colloc_iorfile = $client->LocalFile ($colloc_iorfile);
30 $server->DeleteFile($iorbase);
31 $client->DeleteFile($iorbase);
32 $client->DeleteFile($colloc_iorfile);
34 $SV = $server->CreateProcess ("server",
35 "-ORBdebuglevel $debug_level " .
36 "-o $server_iorfile");
38 $CL = $client->CreateProcess ("client",
39 "-s $client_iorfile " .
40 "-o $colloc_iorfile");
42 $server_status = $SV->Spawn ();
44 if ($server_status != 0) {
45 print STDERR "ERROR: server returned $server_status\n";
46 exit 1;
49 if ($server->WaitForFileTimed ($iorbase,
50 $server->ProcessStartWaitInterval()) == -1) {
51 print STDERR "ERROR: cannot find file <$server_iorfile>\n";
52 $SV->Kill (); $SV->TimedWait (1);
53 exit 1;
56 if ($server->GetFile ($iorbase) == -1) {
57 print STDERR "ERROR: cannot retrieve file <$server_iorfile>\n";
58 $SV->Kill (); $SV->TimedWait (1);
59 exit 1;
61 if ($client->PutFile ($iorbase) == -1) {
62 print STDERR "ERROR: cannot set file <$client_iorfile>\n";
63 $SV->Kill (); $SV->TimedWait (1);
64 exit 1;
67 $client_status = $CL->SpawnWaitKill ($client->ProcessStartWaitInterval() + 20);
69 if ($client_status != 0) {
70 print STDERR "ERROR: client returned $client_status\n";
71 $status = 1;
74 $server_status = $SV->WaitKill ($server->ProcessStopWaitInterval());
76 if ($server_status != 0) {
77 print STDERR "ERROR: server returned $server_status\n";
78 $status = 1;
81 $server->DeleteFile($iorbase);
82 $client->DeleteFile($iorbase);
83 $client->DeleteFile($colloc_iorfile);
84 exit $status;