Merge pull request #2309 from mitza-oci/warnings
[ACE_TAO.git] / TAO / tests / Oneway_Send_Timeouts / run_test.pl
blobf1b9ac9fa99a421578e6f2c1911a333b0f1e4740
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;
10 $target = PerlACE::TestTarget::create_target(1) || die "Create target failed\n";
12 $status = 0;
13 $debug_level = '0';
14 $test_port = 12345;
15 $management_port = 12346;
16 $conf_file = "lf_flush.conf";
17 $flush_strategy = "LF";
19 foreach $i (@ARGV) {
20 if ($i eq '-debug') {
21 $debug_level = '10';
23 elsif ($i eq '-blocking') {
24 $conf_file = "block_flush.conf";
25 $flush_strategy = "BLOCKING";
27 elsif ($i eq '-reactive') {
28 $conf_file = "reactive_flush.conf";
29 $flush_strategy = "REACTIVE";
31 else {
32 print STDERR "ERROR: Unknown option: $i\n";
33 exit 1;
37 $client_conf = $target->LocalFile ($conf_file);
39 if ($target->PutFile ($conf_file) == -1) {
40 print STDERR "ERROR: cannot set file <$client_conf>\n";
41 exit 1;
44 my $test_opts = "-s \'-ORBEndpoint iiop://localhost:$test_port -ORBEndpoint " .
45 "iiop://localhost:$management_port -ORBDebuglevel $debug_level -ORBCollocation " .
46 "no -ORBGestalt LOCAL\' -c \'-k corbaloc::localhost:$test_port/Test -b " .
47 "corbaloc::localhost:$management_port/Management -ORBDebuglevel $debug_level " .
48 "-ORBCollocation no -1 -ORBSvcConf $client_conf -f $flush_strategy " .
49 "-ORBGestalt LOCAL\'";
51 $TV = $target->CreateProcess ("oneway_test", "$test_opts");
53 $test = $TV->Spawn ();
55 if ($test != 0) {
56 print STDERR "ERROR: test returned $test\n";
57 exit 1;
60 $test = $TV->WaitKill ($target->ProcessStartWaitInterval() +
61 $target->ProcessStopWaitInterval());
63 if ($test != 0) {
64 print STDERR "ERROR 2: test returned $test\n";
65 $status = 1;
68 exit $status;