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
;
10 my $server = PerlACE
::TestTarget
::create_target
(1) || die "Create target 1 failed\n";
11 my $client = PerlACE
::TestTarget
::create_target
(2) || die "Create target 2 failed\n";
13 $client_conf = $client->LocalFile ("muxed$PerlACE::svcconf_ext");
19 $client_conf = $client->LocalFile ("muxed$PerlACE::svcconf_ext");
21 elsif ($i eq '-debug') {
24 elsif ($i eq '-exclusive') {
25 $client_conf = $client->LocalFile ("exclusive$PerlACE::svcconf_ext");
29 my $iorbase = "server.ior";
30 my $server_iorfile = $server->LocalFile ($iorbase);
31 my $client_iorfile = $client->LocalFile ($iorbase);
32 $server->DeleteFile($iorbase);
33 $client->DeleteFile($iorbase);
35 $SV = $server->CreateProcess ("server", "-ORBdebuglevel $debug_level -o $server_iorfile");
37 $server_status = $SV->Spawn ();
39 if ($server_status != 0) {
40 print STDERR
"ERROR: server returned $server_status\n";
44 if ($server->WaitForFileTimed ($iorbase,
45 $server->ProcessStartWaitInterval()) == -1) {
46 print STDERR
"ERROR: cannot find file <$server_iorfile>\n";
47 $SV->Kill (); $SV->TimedWait (1);
50 if ($server->GetFile ($iorbase) == -1) {
51 print STDERR
"ERROR: cannot get file <$server_iorfile>\n";
52 $SV->Kill (); $SV->TimedWait (1);
55 if ($client->PutFile ($iorbase) == -1) {
56 print STDERR
"ERROR: cannot set file <$client_iorfile>\n";
57 $SV->Kill (); $SV->TimedWait (1);
61 $CL = $client->CreateProcess ("simple_client",
62 "-ORBsvcconf $client_conf "
63 . "-ORBdebuglevel $debug_level"
64 . " -k file://$client_iorfile "
67 $client_status = $CL->SpawnWaitKill ($client->ProcessStartWaitInterval());
69 if ($client_status != 0) {
70 print STDERR
"ERROR: client returned $client_status\n";
74 $CL2 = $client->CreateProcess ("simple_client",
75 "-ORBsvcconf $client_conf"
76 . " -ORBCollocation no"
77 . " -ORBdebuglevel $debug_level"
78 . " -k file://$client_iorfile "
81 $client_status = $CL2->SpawnWaitKill ($client->ProcessStartWaitInterval());
83 if ($client_status != 0) {
84 print STDERR
"ERROR: client returned $client_status\n";
88 $server_status = $SV->WaitKill ($server->ProcessStopWaitInterval());
90 if ($server_status != 0) {
91 print STDERR
"ERROR: server returned $server_status\n";
95 $server->DeleteFile($iorbase);
96 $client->DeleteFile($iorbase);