Merge pull request #2301 from sonndinh/remove-dup-reactor-functions
[ACE_TAO.git] / TAO / tests / Servant_To_Reference_Test / run_test.pl
blob17c565ef47df26f777573d8a07635eca0e707815
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 my $server = PerlACE::TestTarget::create_target (1) || die "Create target 1 failed\n";
10 my $iorbase = "server.ior";
11 my $server_iorfile = $server->LocalFile ($iorbase);
12 $server->DeleteFile($iorbase);
13 $status = 0;
15 $debug_level = '0';
17 foreach $i (@ARGV) {
18 if ($i eq '-debug') {
19 $debug_level = '10';
23 $SV = $server->CreateProcess ("server", "-ORBdebuglevel $debug_level -o $server_iorfile");
24 $server_status = $SV->Spawn ();
26 if ($server_status != 0) {
27 print STDERR "ERROR: server returned $server_status\n";
28 exit 1;
31 if ($server->WaitForFileTimed ($iorbase,
32 $server->ProcessStartWaitInterval()) == -1) {
33 print STDERR "ERROR: cannot find file <$server_iorfile>\n";
34 $SV->Kill (); $SV->TimedWait (1);
35 exit 1;
38 ## Slower hardware can require much more time to complete.
39 $server_status = $SV->WaitKill ($server->ProcessStopWaitInterval() + 75);
41 if ($server_status != 0) {
42 print STDERR "ERROR: server returned $server_status\n";
43 $status = 1;
46 $server->DeleteFile($iorbase);
48 exit $status;