1 eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
2 & eval 'exec perl -S $0 $argv:q'
7 use lib
"$ENV{ACE_ROOT}/bin";
8 use PerlACE
::TestTarget
;
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";
41 $test_status = $T2->Spawn ();
43 if ($test_status != 0) {
44 print STDERR
"ERROR: could not spawn MCast 2, returned $test_status\n";
49 $test_status = $T1->WaitKill ($test1->ProcessStopWaitInterval() + 285);
51 if ($test_status != 0) {
52 print STDERR
"ERROR: test 1 returned $test_status\n";
56 $test_status = $T2->WaitKill ($test2->ProcessStopWaitInterval() + 285);
58 if ($test_status != 0) {
59 print STDERR
"ERROR: test 2 returned $test_status\n";