diff options
Diffstat (limited to 'TAO/orbsvcs/tests/AVStreams/Simple_Two_Stage/run_test.pl')
-rwxr-xr-x | TAO/orbsvcs/tests/AVStreams/Simple_Two_Stage/run_test.pl | 36 |
1 files changed, 16 insertions, 20 deletions
diff --git a/TAO/orbsvcs/tests/AVStreams/Simple_Two_Stage/run_test.pl b/TAO/orbsvcs/tests/AVStreams/Simple_Two_Stage/run_test.pl index d8bde72c0f5..5dd90188fa6 100755 --- a/TAO/orbsvcs/tests/AVStreams/Simple_Two_Stage/run_test.pl +++ b/TAO/orbsvcs/tests/AVStreams/Simple_Two_Stage/run_test.pl @@ -7,7 +7,6 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' use lib '../../../../../bin'; use PerlACE::Run_Test; -use File::stat; # amount of delay between running the servers @@ -19,14 +18,11 @@ $outfile = PerlACE::LocalFile ("output"); $debug = 0; -# generate test stream data -$input = PerlACE::generate_test_file("test_input", 102400); - unlink $nsior; -for ($i = 0; $i <= $#ARGV; $i++) +for ($i = 0; $i <= $#ARGV; $i++) { - if ($ARGV[$i] eq "-h" || $ARGV[$i] eq "-?") + if ($ARGV[$i] eq "-h" || $ARGV[$i] eq "-?") { print STDERR "\nusage: run_test\n"; @@ -45,12 +41,12 @@ for ($i = 0; $i <= $#ARGV; $i++) exit; } - elsif ($ARGV[$i] eq "-p") + elsif ($ARGV[$i] eq "-p") { @protocols = split (',', $ARGV[$i + 1]); $i++; } - elsif ($ARGV[$i] eq "-d") + elsif ($ARGV[$i] eq "-d") { $debug = $ARGV[$i + 1]; $i++; @@ -63,10 +59,10 @@ print STDERR "Starting Naming Service\n"; $NS->Spawn (); -if (PerlACE::waitforfile_timed ($nsior, 100) == -1) +if (PerlACE::waitforfile_timed ($nsior, 100) == -1) { print STDERR "ERROR: cannot find naming service IOR file\n"; - $NS->Kill (); + $NS->Kill (); exit 1; } @@ -83,26 +79,26 @@ for $protocol (@protocols) } $SV = new PerlACE::Process ("receiver", "-ORBInitRef NameService=file://$nsior -ORBDebugLevel ".$debug." -f ".$output_file); - $CL = new PerlACE::Process ("sender", "-ORBInitRef NameService=file://$nsior -ORBDebugLevel ".$debug." -p ".$protocol." -f $input"); - + $CL = new PerlACE::Process ("sender", "-ORBInitRef NameService=file://$nsior -ORBDebugLevel ".$debug." -p ".$protocol); + print STDERR "Using ".$protocol."\n"; print STDERR "Starting Receiver\n"; - + $SV->Spawn (); - + sleep $sleeptime; - + print STDERR "Starting Sender\n"; - + $sender = $CL->SpawnWaitKill (200); - + if ($sender != 0) { print STDERR "ERROR: sender returned $sender\n"; $status = 1; } - + $receiver = $SV->TerminateWaitKill (200); - + if ($receiver != 0) { print STDERR "ERROR: receiver returned $receiver\n"; $status = 1; @@ -117,6 +113,6 @@ if ($nserver != 0) { } unlink $nsior; -unlink $output, $input; +unlink $output; exit $status; |