Revert "Use a variable on the stack to not have a temporary in the call"
[ACE_TAO.git] / TAO / tests / Bug_2735_Regression / run_test.pl
blob45a2243e8eba8fdd127758d01fba656ab591c4ec
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;
9 use File::Spec;
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";
20 exit (1);
23 $server_status = $SV->WaitKill ($server->ProcessStopWaitInterval());
25 if ($server_status != 0) {
26 print STDERR "ERROR: server returned $server_status\n";
27 exit (1);
30 ## Next, test that the -ORBSvcConfDirective gives an error with bad
31 ## options.
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";
44 exit (1);
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";
56 exit(1);
60 exit(0);