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_base = "exclusive_rw$PerlACE::svcconf_ext";
14 $client_conf = $client->LocalFile ($client_conf_base);
15 if ($client->PutFile ($client_conf_base) == -1) {
16 print STDERR
"ERROR: cannot set file <$client_conf>\n";
30 my $iorbase = "server.ior";
31 my $server_iorfile = $server->LocalFile ($iorbase);
32 my $client_iorfile = $client->LocalFile ($iorbase);
33 $server->DeleteFile($iorbase);
34 $client->DeleteFile($iorbase);
36 my $server_dbg = "-ORBdebuglevel $debug -ORBLogFile server.log" if ($debug > 0);
37 my $client_dbg = "-ORBdebuglevel $debug -ORBLogFile client.log" if ($debug > 0);
39 $SV = $server->CreateProcess ("server", "$server_dbg -o $server_iorfile");
41 $server_status = $SV->Spawn ();
43 if ($server_status != 0) {
44 print STDERR
"ERROR: server returned $server_status\n";
48 if ($server->WaitForFileTimed ($iorbase,
49 $server->ProcessStartWaitInterval()) == -1) {
50 print STDERR
"ERROR: cannot find file <$server_iorfile>\n";
51 $SV->Kill (); $SV->TimedWait (1);
54 if ($server->GetFile ($iorbase) == -1) {
55 print STDERR
"ERROR: cannot get file <$server_iorfile>\n";
56 $SV->Kill (); $SV->TimedWait (1);
59 if ($client->PutFile ($iorbase) == -1) {
60 print STDERR
"ERROR: cannot set file <$client_iorfile>\n";
61 $SV->Kill (); $SV->TimedWait (1);
65 $CL = $client->CreateProcess ("client",
66 "-ORBsvcconf $client_conf $client_dbg"
67 . " -k file://$client_iorfile "
68 . " -n $threads -i $iterations -d -x");
70 $client_status = $CL->SpawnWaitKill ($client->ProcessStartWaitInterval());
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";
84 $server->DeleteFile($iorbase);
85 $client->DeleteFile($iorbase);