Revert "Use a variable on the stack to not have a temporary in the call"
[ACE_TAO.git] / TAO / tests / GIOP_Fragments / PMB_With_Fragments / run_test.pl
blob5bceeeb6846d9d0809a5af2244ebd8d4377310a2
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';
12 $port = PerlACE::uniqueid () + 12000;
13 $endien = (pack('L', 0x41424344) eq 'ABCD' ? '_be' : '');
15 foreach $i (@ARGV) {
16 if ($i eq '-debug') {
17 $debug_level = '10';
21 my $server = PerlACE::TestTarget::create_target (1) || die "Create target 1 failed\n";
22 my $hostname = $server->HostName();
23 my $iorbase = "server.ior";
24 my $server_iorfile = $server->LocalFile ($iorbase);
25 $server->DeleteFile($iorbase);
27 $SV = $server->CreateProcess ("server",
28 "-ORBEndpoint iiop://$hostname:$port " .
29 "-ORBDebugLevel $debug_level " .
30 "-o $server_iorfile");
32 $server_status = $SV->Spawn ();
34 if ($server_status != 0) {
35 print STDERR "ERROR: server returned $server_status\n";
36 $server->DeleteFile($iorbase);
37 exit 1;
40 if ($server->WaitForFileTimed ($iorbase,
41 $server->ProcessStartWaitInterval()) == -1) {
42 print STDERR "ERROR: cannot find file <$server_iorfile>\n";
43 $SV->Kill (); $SV->TimedWait (1);
44 $server->DeleteFile($iorbase);
45 exit 1;
48 my($CL) = system("$^X dribble.pl --host=$hostname --port=$port " .
49 "--stream=giop1.2_fragments$endien.dat " .
50 "--layout=giop1.2_fragments$endien.layout");
51 if ($CL != 0) {
52 print STDERR "ERROR: client returned $CL\n";
53 $status = 2;
56 $server_status = $SV->WaitKill ($server->ProcessStopWaitInterval());
58 if ($server_status != 0) {
59 print STDERR "ERROR: server returned $server_status\n";
60 $status = 3;
63 $server->DeleteFile($iorbase);
65 exit $status;