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
;
13 my $clnt_conf = "muxed$PerlACE::svcconf_ext";
17 # $clnt_conf = "muxed$PerlACE::svcconf_ext";
19 elsif ($i eq '-debug') {
22 elsif ($i eq '-exclusive') {
23 $clnt_conf = "exclusive$PerlACE::svcconf_ext";
27 my $server = PerlACE
::TestTarget
::create_target
(1) || die "Create target 1 failed\n";
28 my $client = PerlACE
::TestTarget
::create_target
(2) || die "Create target 2 failed\n";
31 my $host = $server->HostName();
33 my $iorbase = "server.ior";
34 my $client_clnt_conf = $client->LocalFile($clnt_conf);
35 my $server_iorfile = $server->LocalFile ($iorbase);
36 my $client_iorfile = $client->LocalFile ($iorbase);
37 $server->DeleteFile($iorbase);
38 $client->DeleteFile($iorbase);
40 $SV = $server->CreateProcess ("server", "-ORBEndpoint htiop://$host: -ORBdebuglevel $debug_level ".
41 "-d -o $server_iorfile");
42 $CL = $client->CreateProcess ("simple_client", "-ORBsvcconf $client_clnt_conf -ORBdebuglevel $debug_level ".
43 "-k file://$client_iorfile -i $iterations -x -d");
45 $server_status = $SV->Spawn ();
47 if ($server_status != 0) {
48 print STDERR
"ERROR: server returned $server_status\n";
52 if ($server->WaitForFileTimed ($iorbase,
53 $server->ProcessStartWaitInterval()) == -1) {
54 print STDERR
"ERROR: cannot find file <$server_iorfile>\n";
55 $SV->Kill (); $SV->TimedWait (1);
59 if ($server->GetFile ($iorbase) == -1) {
60 print STDERR
"ERROR: cannot retrieve file <$server_iorfile>\n";
61 $SV->Kill (); $SV->TimedWait (1);
65 if ($client->PutFile ($iorbase) == -1) {
66 print STDERR
"ERROR: cannot set file <$client_iorfile>\n";
67 $SV->Kill (); $SV->TimedWait (1);
71 $client_status = $CL->SpawnWaitKill ($client->ProcessStartWaitInterval() + 45);
73 if ($client_status != 0) {
74 print STDERR
"ERROR: client returned $client_status\n";
78 $server_status = $SV->WaitKill ($server->ProcessStopWaitInterval());
80 if ($server_status != 0) {
81 print STDERR
"ERROR: server returned $server_status\n";
85 $server->DeleteFile($iorbase);
86 $client->DeleteFile($iorbase);