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 $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";
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";
52 $server_status = $SV->WaitKill ($server->ProcessStopWaitInterval());
54 if ($server_status != 0) {
55 print STDERR
"ERROR: server returned $server_status\n";