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
;
11 my $server = PerlACE
::TestTarget
::create_target
(1) || die "Create target 1 failed\n";
13 ## First test that the -ORBSvcConfDirective works with good options.
14 my $SV = $server->CreateProcess ("server", "-s");
16 $server_status = $SV->Spawn ($server->ProcessStartWaitInterval());
18 if ($server_status != 0) {
19 print STDERR
"ERROR: server returned $server_status\n";
23 $server_status = $SV->WaitKill ($server->ProcessStopWaitInterval());
25 if ($server_status != 0) {
26 print STDERR
"ERROR: server returned $server_status\n";
30 ## Next, test that the -ORBSvcConfDirective gives an error with bad
32 $SV = $server->CreateProcess ("server", "-f");
34 ## Run the server, but redirect stdout and stderr to /dev/null
35 ## so that the errors messages don't show up on the scoreboard
37 open(STDOUT
, '>' . File
::Spec
->devnull());
38 open(STDERR
, ">&STDOUT");
40 $server_status = $SV->Spawn ($server->ProcessStartWaitInterval());
42 if ($server_status != 0) {
43 print STDERR
"ERROR: server returned $server_status\n";
47 $server_status = $SV->WaitKill ($server->ProcessStopWaitInterval());
49 open(STDOUT
, ">&SAVEOUT");
50 open(STDERR
, ">&SAVEERR");
52 ## It should have thrown an exception, so if the server exits
53 ## with a zero status, then something is wrong.
54 if ($server_status == 0) {
55 print STDERR
"ERROR: server returned $server\n";