Changes to attempt to silence bcc64x
[ACE_TAO.git] / TAO / tests / Bug_3547_Regression / run_test.pl
blobdc1d19b996ced759fd42e9ff25112d59594e0bb0
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 $hostname = $server->HostName ();
23 $port_iiop = $server->RandomPort ();
24 $port_diop = $server->RandomPort ();
27 $SV = $server->CreateProcess ("server",
28 "-ORBdebuglevel $debug_level " .
29 "-ORBListenEndpoints iiop://:$port_iiop;diop://:$port_diop");
31 $CL = $client->CreateProcess ("client",
32 "-ORBdebuglevel $debug_level " .
33 "-ORBInitRef UDPTest=corbaloc:diop:$hostname:$port_diop/UDPTest " .
34 "-ORBDefaultInitRef corbaloc:iiop:$hostname:$port_iiop");
36 $server_status = $SV->Spawn ();
38 if ($server_status != 0) {
39 print STDERR "ERROR: server returned $server_status\n";
40 exit 1;
43 sleep($server->ProcessStartWaitInterval() / 5);
45 $client_status = $CL->SpawnWaitKill ($client->ProcessStartWaitInterval() + 75);
47 if ($client_status != 0) {
48 print STDERR "ERROR: client returned $client_status\n";
49 $status = 1;
52 $server_status = $SV->WaitKill ($server->ProcessStopWaitInterval());
54 if ($server_status != 0) {
55 print STDERR "ERROR: server returned $server_status\n";
56 $status = 1;
59 exit $status;