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 server failed\n";
20 my $client = PerlACE
::TestTarget
::create_target
(2) || die "Create client failed\n";
22 my $iorfile = "server.ior";
24 #Files which used by server
25 my $server_iorfile = $server->LocalFile ($iorfile);
26 $server->DeleteFile($iorfile);
28 #Files which used by server2
29 my $client_iorfile = $client->LocalFile ($iorfile);
30 $client->DeleteFile($iorfile);
32 $SV = $server->CreateProcess ("server",
33 "-ORBdebuglevel $debug_level " .
34 "-o $server_iorfile");
36 $CL = $client->CreateProcess ("client",
37 "-ORBAllowZIOPNoServerPolicies 1 " .
38 "-ORBdebuglevel $debug_level " .
39 "-k file://$iorfile");
41 $server_status = $SV->Spawn ();
43 if ($server_status != 0) {
44 print STDERR
"ERROR: server returned $server_status\n";
49 $SV->Kill (); $SV->TimedWait (1);
52 if ($server->WaitForFileTimed ($iorfile,
53 $server->ProcessStartWaitInterval()) == -1) {
54 print STDERR
"ERROR: cannot find file <$server_iorfile>\n";
59 if ($server->GetFile ($iorfile) == -1) {
60 print STDERR
"ERROR: cannot retrieve file <$server_iorfile>\n";
64 if ($client->PutFile ($iorfile) == -1) {
65 print STDERR
"ERROR: cannot set file <$client_iorfile>\n";
70 $client_status = $CL->SpawnWaitKill ($client->ProcessStartWaitInterval() + 60);
72 if ($client_status != 0) {
73 print STDERR
"ERROR: client returned $client_status\n";
77 $server_status = $SV->WaitKill ($server->ProcessStopWaitInterval());
79 if ($server_status != 0) {
80 print STDERR
"ERROR: server returned $server_status\n";
85 $server->DeleteFile($iorfile);
86 $client->DeleteFile($iorfile);