diff options
author | mcorino <mcorino@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2004-09-14 08:46:48 +0000 |
---|---|---|
committer | mcorino <mcorino@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2004-09-14 08:46:48 +0000 |
commit | 3ffbd69c80594d6e366a77c291ff37273ce258ba (patch) | |
tree | c53aa99f4fabe073747965c90d19c724871fac7a /TAO/orbsvcs/tests/AVStreams/Full_Profile | |
parent | 0a818e13a9d706468b79e69f0505f9abe2206ce1 (diff) | |
download | ATCD-3ffbd69c80594d6e366a77c291ff37273ce258ba.tar.gz |
ChangeLogTag: Tue Sep 14 08:41:00 UTC 2004 Martin Corino <mcorino@remedy.nl>
Diffstat (limited to 'TAO/orbsvcs/tests/AVStreams/Full_Profile')
-rwxr-xr-x | TAO/orbsvcs/tests/AVStreams/Full_Profile/run_test.pl | 54 |
1 files changed, 17 insertions, 37 deletions
diff --git a/TAO/orbsvcs/tests/AVStreams/Full_Profile/run_test.pl b/TAO/orbsvcs/tests/AVStreams/Full_Profile/run_test.pl index d6df72209c9..242253d1740 100755 --- a/TAO/orbsvcs/tests/AVStreams/Full_Profile/run_test.pl +++ b/TAO/orbsvcs/tests/AVStreams/Full_Profile/run_test.pl @@ -19,38 +19,18 @@ $outfile = PerlACE::LocalFile ("output"); $debug = 0; -unlink # generate test stream data -$input = "test_input"; -while ( -e $input ) { - $input = $input."X"; -} -open( INPUT, "> $input" ) || die( "can't create input file: $input" ); -for($i =0; $i < 1000 ; $i++ ) { - print INPUT <<EOFINPUT; -0123456789 -0123456789 -0123456789 -0123456789 -0123456789 -0123456789 -0123456789 -0123456789 -0123456789 -0123456789 -EOFINPUT -} -close(INPUT); - -$nsior; +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"; @@ -62,7 +42,7 @@ for ($i = 0; $i <= $#ARGV; $i++) exit; } - elsif ($ARGV[$i] eq "-d") + elsif ($ARGV[$i] eq "-d") { $debug = $ARGV[$i + 1]; $i++; @@ -75,10 +55,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; } @@ -90,31 +70,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"); - + 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; |