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
;
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";
31 if ($server->PutFile ($svc_conf) == -1) {
32 print STDERR
"ERROR: cannot set file <$server_svc_conf>\n";
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\" " .
42 $server_status = $SV->SpawnWaitKill ($server->ProcessStartWaitInterval());
44 if ($server_status != 0) {
45 print STDERR
"ERROR: server returned $server_status\n";
49 print STDOUT
"Testing with default svc.conf\n";
51 $SV = $server->CreateProcess ("server",
52 "-a \"AAA -ORBdebuglevel $debug_level -ORBGestalt LOCAL\" " .
55 $server_status = $SV->SpawnWaitKill ($server->ProcessStartWaitInterval());
57 if ($server_status != 0) {
58 print STDERR
"ERROR: server returned $server_status\n";
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";
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\\\"\" " .
83 $server_status = $SV->SpawnWaitKill ($server->ProcessStartWaitInterval());
85 if ($server_status != 0) {
86 print STDERR
"ERROR: server returned $server_status\n";