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
;
14 $svc_conf = $PerlACE::svcconf_ext
;
19 my $help = 0; # handled locally
20 my $man = 0; # handled locally
21 my $ssl = 1; # handled locally
22 my $dotdec = 0; # handled locally
23 my $debug; # handled locally
24 my $shost; # handled locally
25 my $chost; # handled locally
26 my $clog; # handled locally
27 my $slog; # handled locally
31 GetOptions
('help|?' => \
$help,
39 'debug=i' => \
$debug) or pod2usage
(2);
43 $conf_client = " -ORBSvcConf client$svc_conf";
44 $conf_server = " -ORBSvcConf server$svc_conf";
48 $opt = "$opt -ORBDebugLevel $debug";
52 if ($dotdec =~ /client/) {
53 $conf_client = "$conf_client -ORBDottedDecimalAddresses 1";
55 if ($dotdec =~ /server/) {
56 $conf_server = "$conf_server -ORBDottedDecimalAddresses 1";
61 $conf_server = "$conf_server -ORBLogFile $slog";
65 $conf_client = "$conf_client -ORBLogFile $clog";
69 $conf_server = "$conf_server -ORBListenEndpoints iiop:///hostname_in_ior=$shost";
73 $conf_client = "$conf_client -ORBListenEndpoints iiop:///hostname_in_ior=$chost";
76 if ( $man or $help ) {
77 # Load Pod::Usage only if needed.
78 require "Pod/Usage.pm";
80 pod2usage
(1) if $help;
81 pod2usage
(VERBOSE
=> 2) if $man;
87 options
() or die "Error: Nothing executed";
95 my $server = PerlACE
::TestTarget
::create_target
(1) || die "Create target 1 failed\n";
96 my $client = PerlACE
::TestTarget
::create_target
(2) || die "Create target 2 failed\n";
98 my $iorbase = "test.ior";
99 my $server_iorfile = $server->LocalFile ($iorbase);
100 my $client_iorfile = $client->LocalFile ($iorbase);
101 $server->DeleteFile($iorbase);
102 $client->DeleteFile($iorbase);
105 $SV = $server->CreateProcess ("server",
108 "-o $server_iorfile ");
110 $CL = $client->CreateProcess ("client",
113 "-k file://$client_iorfile " .
116 print STDERR
"\n\n==== Running SSLIOP Big_Request test\n";
118 print STDERR
"Executing: server $conf_server $opt -o $iorbase\n";
120 $server_status = $SV->Spawn ();
122 if ($server_status != 0) {
123 print STDERR
"ERROR: server returned $server_status\n";
127 if ($server->WaitForFileTimed ($iorbase,
128 $server->ProcessStartWaitInterval()) == -1) {
129 print STDERR
"ERROR: cannot find file <$server_iorfile>\n";
130 $SV->Kill (); $SV->TimedWait (1);
134 if ($server->GetFile ($iorbase) == -1) {
135 print STDERR
"ERROR: cannot retrieve file <$server_iorfile>\n";
136 $SV->Kill (); $SV->TimedWait (1);
139 if ($client->PutFile ($iorbase) == -1) {
140 print STDERR
"ERROR: cannot set file <$client_iorfile>\n";
141 $SV->Kill (); $SV->TimedWait (1);
145 print STDERR
"Executing: client $conf_client $opt\n";
147 $client_status = $CL->SpawnWaitKill ($client->ProcessStartWaitInterval() + 165);
149 if ($client_status != 0) {
150 print STDERR
"ERROR: client returned $client_status\n";
154 $server_status = $SV->WaitKill ($server->ProcessStopWaitInterval());
156 if ($server_status != 0) {
157 print STDERR
"ERROR: server returned $server_status\n";
161 $server->DeleteFile($iorbase);
162 $client->DeleteFile($iorbase);