Merge pull request #2301 from sonndinh/remove-dup-reactor-functions
[ACE_TAO.git] / TAO / tests / Bug_3826_Regression / run_test.pl
blobf2e8d33de0d444b4aa79112fc7d19e7bac6ff5d5
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 $svc_conf = "svc.conf";
22 my $orb_svc_conf = "orb_svc.conf";
23 my $server_svc_conf = $server->LocalFile ($svc_conf);
24 my $server_orb_svc_conf = $server->LocalFile ($orb_svc_conf);
26 # copy the configuation file
27 if ($server->PutFile ($orb_svc_conf) == -1) {
28 print STDERR "ERROR: cannot set file <$server_orb_svc_conf>\n";
29 return 1;
31 if ($server->PutFile ($svc_conf) == -1) {
32 print STDERR "ERROR: cannot set file <$server_svc_conf>\n";
33 return 1;
36 print STDOUT "Testing with -ORBSvcConf\n";
38 $SV = $server->CreateProcess ("server",
39 "-a \"AAA -ORBdebuglevel $debug_level -ORBSvcConf $server_orb_svc_conf -ORBGestalt LOCAL\" " .
40 "-b \"BBB\" -e 1");
42 $server_status = $SV->SpawnWaitKill ($server->ProcessStartWaitInterval());
44 if ($server_status != 0) {
45 print STDERR "ERROR: server returned $server_status\n";
46 exit 1;
49 print STDOUT "Testing with default svc.conf\n";
51 $SV = $server->CreateProcess ("server",
52 "-a \"AAA -ORBdebuglevel $debug_level -ORBGestalt LOCAL\" " .
53 "-b \"BBB\" -e 2");
55 $server_status = $SV->SpawnWaitKill ($server->ProcessStartWaitInterval());
57 if ($server_status != 0) {
58 print STDERR "ERROR: server returned $server_status\n";
59 exit 1;
62 print STDOUT "Testing with -ORBIgnoreDefaultSvcConfFile\n";
64 $SV = $server->CreateProcess ("server",
65 "-a \"AAA -ORBdebuglevel $debug_level -ORBIgnoreDefaultSvcConfFile\" " .
66 "-b \"BBB -ORBGestalt LOCAL\" -e 0"); # -e 0 means no expected value.
68 $server_status = $SV->SpawnWaitKill ($server->ProcessStartWaitInterval());
70 if ($server_status != 0) {
71 print STDERR "ERROR: server returned $server_status\n";
72 exit 1;
75 print STDOUT "Testing with -ORBSvcConfDirective\n";
77 $directive = "static Resource_Factory \\\\\\\"-ORBConnectionCacheMax 3\\\\\\\"";
78 $SV = $server->CreateProcess ("server",
79 "-a \"AAA -ORBdebuglevel $debug_level -ORBGestalt LOCAL " .
80 "-ORBSvcConfDirective \\\"$directive\\\"\" " .
81 "-b \"BBB\" -e 3");
83 $server_status = $SV->SpawnWaitKill ($server->ProcessStartWaitInterval());
85 if ($server_status != 0) {
86 print STDERR "ERROR: server returned $server_status\n";
87 exit 1;
90 exit $status;