diff options
Diffstat (limited to 'ACE/TAO/tests/Oneway_Send_Timeouts/run_test.pl')
-rwxr-xr-x | ACE/TAO/tests/Oneway_Send_Timeouts/run_test.pl | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/ACE/TAO/tests/Oneway_Send_Timeouts/run_test.pl b/ACE/TAO/tests/Oneway_Send_Timeouts/run_test.pl new file mode 100755 index 00000000000..7b3b96e92ba --- /dev/null +++ b/ACE/TAO/tests/Oneway_Send_Timeouts/run_test.pl @@ -0,0 +1,61 @@ +eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' + & eval 'exec perl -S $0 $argv:q' + if 0; + +# $Id$ +# -*- perl -*- + +use lib "$ENV{ACE_ROOT}/bin"; +use PerlACE::TestTarget; + +$target = PerlACE::TestTarget::create_target(1) || die "Create target failed\n"; + +$status = 0; +$debug_level = '0'; +$test_port = 12345; +$management_port = 12346; +$client_conf = $target->LocalFile ("lf_flush.conf"); +$flush_strategy = "LF"; + +foreach $i (@ARGV) { + if ($i eq '-debug') { + $debug_level = '10'; + } + elsif ($i eq '-blocking') { + $client_conf = "block_flush.conf"; + $flush_strategy = "BLOCKING"; + } + elsif ($i eq '-reactive') { + $client_conf = "reactive_flush.conf"; + $flush_strategy = "REACTIVE"; + } + else { + print STDERR "ERROR: Unknown option: $i\n"; + exit 1; + } +} + +my $test_opts = "-s \'-ORBEndpoint iiop://localhost:$test_port -ORBEndpoint " . + "iiop://localhost:$management_port -ORBDebuglevel $debug_level -ORBCollocation " . + "no -ORBGestalt LOCAL\' -c \'-k corbaloc::localhost:$test_port/Test -b " . + "corbaloc::localhost:$management_port/Management -ORBDebuglevel $debug_level " . + "-ORBCollocation no -1 -ORBSvcConf $client_conf -f $flush_strategy " . + "-ORBGestalt LOCAL\'"; + +$TV = $target->CreateProcess ("oneway_test", "$test_opts"); + +$test = $TV->Spawn (); + +if ($test != 0) { + print STDERR "ERROR: test returned $test\n"; + exit 1; +} + +$test = $TV->WaitKill ($target->ProcessStartWaitInterval()); + +if ($test != 0) { + print STDERR "ERROR 2: test returned $test\n"; + $status = 1; +} + +exit $status; |