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 my $iorbase = "ior.ior";
23 my $colloc_iorfile = "collocated_server.ior";
25 my $server_iorfile = $server->LocalFile ($iorbase);
26 my $client_iorfile = $client->LocalFile ($iorbase);
28 my $client_colloc_iorfile = $client->LocalFile ($colloc_iorfile);
30 $server->DeleteFile($iorbase);
31 $client->DeleteFile($iorbase);
32 $client->DeleteFile($colloc_iorfile);
34 $SV = $server->CreateProcess ("server",
35 "-ORBdebuglevel $debug_level " .
36 "-o $server_iorfile");
38 $CL = $client->CreateProcess ("client",
39 "-s $client_iorfile " .
40 "-o $colloc_iorfile");
42 $server_status = $SV->Spawn ();
44 if ($server_status != 0) {
45 print STDERR
"ERROR: server returned $server_status\n";
49 if ($server->WaitForFileTimed ($iorbase,
50 $server->ProcessStartWaitInterval()) == -1) {
51 print STDERR
"ERROR: cannot find file <$server_iorfile>\n";
52 $SV->Kill (); $SV->TimedWait (1);
56 if ($server->GetFile ($iorbase) == -1) {
57 print STDERR
"ERROR: cannot retrieve file <$server_iorfile>\n";
58 $SV->Kill (); $SV->TimedWait (1);
61 if ($client->PutFile ($iorbase) == -1) {
62 print STDERR
"ERROR: cannot set file <$client_iorfile>\n";
63 $SV->Kill (); $SV->TimedWait (1);
67 $client_status = $CL->SpawnWaitKill ($client->ProcessStartWaitInterval() + 20);
69 if ($client_status != 0) {
70 print STDERR
"ERROR: client returned $client_status\n";
74 $server_status = $SV->WaitKill ($server->ProcessStopWaitInterval());
76 if ($server_status != 0) {
77 print STDERR
"ERROR: server returned $server_status\n";
81 $server->DeleteFile($iorbase);
82 $client->DeleteFile($iorbase);
83 $client->DeleteFile($colloc_iorfile);