Revert "Use a variable on the stack to not have a temporary in the call"
[ACE_TAO.git] / TAO / tests / COIOP / run_test.pl
blobfe1f2648f60ff4e28ff901d185cb0609738e19c3
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 $iorbase = "server.ior";
22 my $server_iorfile = $server->LocalFile ($iorbase);
23 $server->DeleteFile($iorbase);
25 print STDERR "======== Running in Default Mode\n";
26 $SV = $server->CreateProcess ("COIOP_Test",
27 "-s -o $server_iorfile -k file://$server_iorfile " .
28 "-ORBdebuglevel $debug_level");
29 $server_status = $SV->SpawnWaitKill ($server->ProcessStartWaitInterval() + 45);
31 if ($server_status != 0) {
32 print STDERR "ERROR: server returned $server_status\n";
33 exit 1;
36 $server->DeleteFile($iorbase);
38 print STDERR "======== Running with per-orb\n";
39 $SV->Arguments ("-s -o $server_iorfile -k file://$server_iorfile " .
40 "-ORBdebuglevel $debug_level -ORBCollocation per-orb");
41 $server_status = $SV->SpawnWaitKill ($server->ProcessStartWaitInterval() + 45);
43 if ($server_status != 0) {
44 print STDERR "ERROR: server returned $server_status\n";
45 exit 1;
48 $server->DeleteFile($iorbase);
50 print STDERR "======== Running with no collocation\n";
51 $SV->Arguments ("-o $server_iorfile -k file://$server_iorfile " .
52 "-ORBdebuglevel $debug_level -ORBCollocation no");
53 $server_status = $SV->SpawnWaitKill ($server->ProcessStartWaitInterval() + 45);
55 if ($server_status != 0) {
56 print STDERR "ERROR: server returned $server_status\n";
57 exit 1;
60 $server->DeleteFile($iorbase);
62 print STDERR "======== Running in default mode and two ORBS\n";
63 $SV->Arguments ("-s -o $server_iorfile -k file://$server_iorfile -n " .
64 "-ORBdebuglevel $debug_level");
65 $server_status = $SV->SpawnWaitKill ($server->ProcessStartWaitInterval() + 45);
67 if ($server_status != 0) {
68 print STDERR "ERROR: server returned $server_status\n";
69 exit 1;
72 $server->DeleteFile($iorbase);
74 print STDERR "======== Running in per-orb mode and two ORBS\n";
75 $SV->Arguments ("-o $server_iorfile -k file://$server_iorfile -n " .
76 "-ORBdebuglevel $debug_level -ORBCollocation per-orb");
77 $server_status = $SV->SpawnWaitKill ($server->ProcessStartWaitInterval() + 45);
79 if ($server_status != 0) {
80 print STDERR "ERROR: server returned $server_status\n";
81 exit 1;
84 $server->DeleteFile($iorbase);
86 print STDERR "======== Running in no collocation mode and two ORBS\n";
87 $SV->Arguments ("-o $server_iorfile -k file://$server_iorfile -n " .
88 "-ORBdebuglevel $debug_level -ORBCollocation no");
89 $server_status = $SV->SpawnWaitKill ($server->ProcessStartWaitInterval() + 45);
91 if ($server_status != 0) {
92 print STDERR "ERROR: server returned $server_status\n";
93 exit 1;
96 $server->DeleteFile($iorbase);
98 exit $status;