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
;
15 my $target1 = PerlACE
::TestTarget
::create_target
(1) || die "Create target 1 failed\n";
16 my $target2 = PerlACE
::TestTarget
::create_target
(2) || die "Create target 2 failed\n";
22 $debug_log_sv = $target1->LocalFile ('server.log');
23 $debug_log_cl = $target1->LocalFile ('client.log');
25 $debug_opts_sv = "-ORBLogFile " . $debug_log_sv;
26 $debug_opts_cl = "-ORBLogFile " . $debug_log_cl;
30 $iorbase = "server.ior";
31 $iorfile1 = $target1->LocalFile ("$iorbase");
32 $iorfile2 = $target2->LocalFile ("$iorbase");
33 $target1->DeleteFile($iorbase);
34 $target2->DeleteFile($iorbase);
36 $SV = $target1->CreateProcess ("server", "$debug_opts_sv -ORBdebuglevel $debug_level -o $iorfile1");
37 $CL = $target2->CreateProcess ("client", "$debug_opts_cl -ORBDebugLevel $debug_level -k file://$iorfile2");
39 $server = $SV->Spawn ();
42 print STDERR
"ERROR: server returned $server\n";
46 if ($target1->WaitForFileTimed ($iorbase,
47 $target1->ProcessStartWaitInterval()) == -1) {
48 print STDERR
"ERROR: cannot find file <$iorfile1>\n";
49 $SV->Kill (); $SV->TimedWait (1);
53 $client = $CL->SpawnWaitKill ($target2->ProcessStartWaitInterval() + 285);
56 print STDERR
"ERROR: client returned $client\n";
60 $server = $SV->WaitKill ($target1->ProcessStopWaitInterval());
63 print STDERR
"ERROR: server returned $server\n";
67 $target1->GetStderrLog();
68 $target2->GetStderrLog();
70 $target1->DeleteFile($iorbase);
71 $target2->DeleteFile($iorbase);