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";
23 $iorbaseA = "iorA.ior";
24 $iorbaseB = "iorB.ior";
26 my $server_iorfileA = $server->LocalFile ($iorbaseA);
27 my $server_iorfileB = $server->LocalFile ($iorbaseB);
28 my $client_iorfileA = $client->LocalFile ($iorbaseA);
29 my $client_iorfileB = $client->LocalFile ($iorbaseB);
30 $server->DeleteFile($iorbaseA);
31 $server->DeleteFile($iorbaseB);
32 $client->DeleteFile($iorbaseA);
33 $client->DeleteFile($iorbaseB);
35 $SV = $server->CreateProcess ("server", "-ORBDebuglevel $debug_level -a $server_iorfileA -b $server_iorfileB");
37 $CL = $client->CreateProcess ("client", "-a file://$client_iorfileA -b file://$client_iorfileB");
39 $server_status = $SV->Spawn ();
41 if ($server_status != 0) {
42 print STDERR
"ERROR: server returned $server_status\n";
46 if ($server->WaitForFileTimed ($iorbaseA,
47 $server->ProcessStartWaitInterval ()) == -1) {
48 print STDERR
"ERROR: cannot find file <$server_iorfileA>\n";
49 $SV->Kill (); $SV->TimedWait (1);
53 $client_status = $CL->SpawnWaitKill ($client->ProcessStartWaitInterval ());
55 if ($client_status != 0) {
56 print STDERR
"ERROR: client returned $client_status\n";
60 $server_status = $SV->WaitKill ($server->ProcessStopWaitInterval ());
62 if ($server_status != 0) {
63 print STDERR
"ERROR: server returned $server_status\n";
67 $server->DeleteFile($iorbaseA);
68 $server->DeleteFile($iorbaseB);
69 $client->DeleteFile($iorbaseA);
70 $client->DeleteFile($iorbaseB);