Changes to attempt to silence bcc64x
[ACE_TAO.git] / TAO / orbsvcs / tests / EC_MT_Mcast / run_test.pl
blob008e4a4376e2a42047b3500efbc3a68f5d46ecf2
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 $status = 0;
11 $debug_level = '0';
13 foreach $i (@ARGV) {
14 if ($i eq '-debug') {
15 $debug_level = '10';
19 my $test1 = PerlACE::TestTarget::create_target (1) || die "Create target 1 failed\n";
20 my $test2 = PerlACE::TestTarget::create_target (2) || die "Create target 2 failed\n";
22 my $svc_conf = "svc$PerlACE::svcconf_ext";
23 my $test1_svc_conf = $test1->LocalFile ($svc_conf);
24 my $test2_svc_conf = $test2->LocalFile ($svc_conf);
26 my $mcast_address = (int(rand(16)) + 224) . '.' . int(rand(256)) . '.' .
27 int(rand(256)) . '.' . int(rand(256)) . ':' .
28 (10001 + $test1->RandomPort());
30 # Run two copies of the same test...
31 $T1 = $test1->CreateProcess ("MCast", "-m $mcast_address -ORBSvcConf $test1_svc_conf");
32 $T2 = $test2->CreateProcess ("MCast", "-m $mcast_address -ORBSvcConf $test2_svc_conf");
34 $test_status = $T1->Spawn ();
36 if ($test_status != 0) {
37 print STDERR "ERROR: could not spawn MCast 1, returned $test_status\n";
38 exit 1;
41 $test_status = $T2->Spawn ();
43 if ($test_status != 0) {
44 print STDERR "ERROR: could not spawn MCast 2, returned $test_status\n";
45 $T1->Kill ();
46 exit 1;
49 $test_status = $T1->WaitKill ($test1->ProcessStopWaitInterval() + 285);
51 if ($test_status != 0) {
52 print STDERR "ERROR: test 1 returned $test_status\n";
53 $status = 1;
56 $test_status = $T2->WaitKill ($test2->ProcessStopWaitInterval() + 285);
58 if ($test_status != 0) {
59 print STDERR "ERROR: test 2 returned $test_status\n";
60 $status = 1;
63 exit $status;