Merge pull request #1844 from jrw972/monterey
[ACE_TAO.git] / TAO / tests / Bug_1869_Regression / run_test.pl
blob02e82e2d6dad4a9c3fb7285f1747f77153a32106
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 = $server->RandomPort ();
25 $SV = $server->CreateProcess ("server", "-ORBdebuglevel $debug_level " .
26 "-ORBEndpoint iiop://$hostname:$port");
28 $CL = $client->CreateProcess ("client", "-h $hostname -p $port");
30 $server_status = $SV->Spawn ();
32 if ($server_status != 0) {
33 print STDERR "ERROR: server returned $server_status\n";
34 exit 1;
37 $client_status = $CL->Spawn ($client->ProcessStartWaitInterval() + 285);
39 if ($client_status != 0) {
40 print STDERR "ERROR: client returned $client_status\n";
41 exit 1;
44 sleep($client->ProcessStartWaitInterval() / 3);
46 print STDERR "Kill server\n";
48 $SV->Kill ();
50 sleep($client->ProcessStartWaitInterval() / 3);
53 print STDERR "Restart server\n";
55 $server_status = $SV->Spawn ();
57 sleep($server->ProcessStartWaitInterval() + 15);
59 exit $status;