Merge pull request #2220 from DOCGroup/revert-2217-jwi-inetwraning
[ACE_TAO.git] / TAO / tests / GIOP_Fragments / Java_Big_Request / run_test.pl
blob769b457d89a57dc168a60499fb066a66cbe7d78e
1 eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
2 & eval 'exec perl -S $0 $argv:q'
3 if 0;
5 # -*- perl -*-
7 use lib "$ENV{ACE_ROOT}/bin";
8 use PerlACE::TestTarget;
10 $status = 0;
11 $debug_level = '0';
13 foreach $i (@ARGV) {
14 if ($i eq '-debug') {
15 $debug_level = '10';
19 my $server = PerlACE::TestTarget::create_target (1) || die "Create target 1 failed\n";
21 my $host = $server->HostName();
22 my $port = $server->RandomPort();
23 my $iorbase = "server.ior";
24 my $server_iorfile = $server->LocalFile ($iorbase);
25 $server->DeleteFile($iorbase);
27 $SV = $server->CreateProcess ("server", "");
28 ## No ORB fragments GIOP 1.0 messages.
29 ## The JDK ORB only fragments GIOP 1.2 messages.
30 foreach my $giop ('1.2') {
31 print "Testing GIOP $giop Fragmentation\n";
33 $server->DeleteFile($iorbase);
34 $SV->Arguments("-ORBdebuglevel $debug_level -o $server_iorfile ".
35 "-ORBEndpoint iiop://$giop\@$host:$port");
37 $server_status = $SV->Spawn ();
39 if ($server_status != 0) {
40 print STDERR "ERROR: server returned $server_status\n";
41 exit 1;
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);
48 exit 1;
51 my $client_status = system('java client');
52 if ($client_status != 0) {
53 print STDERR "ERROR: client returned $client_status\n";
54 ++$status;
57 $server_status = $SV->WaitKill ($server->ProcessStopWaitInterval() + 10);
59 if ($server_status != 0) {
60 print STDERR "ERROR: server returned $server_status\n";
61 ++$status;
64 if ($status) {
65 last;
69 $server->DeleteFile($iorbase);
71 exit $status;