diff options
Diffstat (limited to 'TAO/orbsvcs/tests/AVStreams/Full_Profile/run_test.pl')
-rwxr-xr-x | TAO/orbsvcs/tests/AVStreams/Full_Profile/run_test.pl | 36 |
1 files changed, 17 insertions, 19 deletions
diff --git a/TAO/orbsvcs/tests/AVStreams/Full_Profile/run_test.pl b/TAO/orbsvcs/tests/AVStreams/Full_Profile/run_test.pl index 242253d1740..ba31ae468a7 100755 --- a/TAO/orbsvcs/tests/AVStreams/Full_Profile/run_test.pl +++ b/TAO/orbsvcs/tests/AVStreams/Full_Profile/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 @@ -16,21 +15,20 @@ $status = 0; $nsior = PerlACE::LocalFile ("ns.ior"); $outfile = PerlACE::LocalFile ("output"); +$makefile = PerlACE::LocalFile ("Makefile"); $debug = 0; unlink $nsior; -# generate test stream data -$input = PerlACE::generate_test_file("test_input", 102400); @protocols = ("TCP", "UDP" ); -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"; @@ -42,7 +40,7 @@ for ($i = 0; $i <= $#ARGV; $i++) exit; } - elsif ($ARGV[$i] eq "-d") + elsif ($ARGV[$i] eq "-d") { $debug = $ARGV[$i + 1]; $i++; @@ -55,10 +53,10 @@ print STDERR "Starting Naming Service\n"; $NS->Spawn (); -if (PerlACE::waitforfile_timed ($nsior, 10) == -1) +if (PerlACE::waitforfile_timed ($nsior, 10) == -1) { print STDERR "ERROR: cannot find naming service IOR file\n"; - $NS->Kill (); + $NS->Kill (); exit 1; } @@ -70,31 +68,31 @@ for $protocol (@protocols) { $output_file = "RTP_output"; } - else { + else { $output_file = $protocol."_output"; } $SV = new PerlACE::Process ("server", "-ORBInitRef NameService=file://$nsior -ORBDebugLevel ".$debug." -f ".$output_file); - $CL = new PerlACE::Process ("ftp", "-ORBInitRef NameService=file://$nsior -ORBDebugLevel ".$debug." -p ".$protocol." -f $input"); - + $CL = new PerlACE::Process ("ftp", "-ORBInitRef NameService=file://$nsior -ORBDebugLevel ".$debug." -p ".$protocol." -f $makefile"); + print STDERR "Using ".$protocol."\n"; print STDERR "Starting Server\n"; - + $SV->Spawn (); - + sleep $sleeptime; - + print STDERR "Starting Client\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; @@ -109,6 +107,6 @@ if ($nserver != 0) { } unlink $nsior; -unlink $output, $input; +unlink $output; exit $status; |