diff options
author | yamuna <yamuna@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2004-02-20 20:00:10 +0000 |
---|---|---|
committer | yamuna <yamuna@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2004-02-20 20:00:10 +0000 |
commit | c6618ea4918716d84ad385792edbe43b86ac3e11 (patch) | |
tree | 0b80a9d2c224445655b3a67ce60094836b4fcd3b /TAO/orbsvcs | |
parent | dc95a59aa13ac5c57c13693662d9c0c3bf28093c (diff) | |
download | ATCD-c6618ea4918716d84ad385792edbe43b86ac3e11.tar.gz |
ChangelogTag: Fri Feb 20 15:00:13 2004 Yamuna Krishnamurthy <yamuna@oomworks.com>
Diffstat (limited to 'TAO/orbsvcs')
-rwxr-xr-x | TAO/orbsvcs/tests/AVStreams/Full_Profile/run_test.pl | 124 |
1 files changed, 68 insertions, 56 deletions
diff --git a/TAO/orbsvcs/tests/AVStreams/Full_Profile/run_test.pl b/TAO/orbsvcs/tests/AVStreams/Full_Profile/run_test.pl index 4ec7a64a3a2..ba31ae468a7 100755 --- a/TAO/orbsvcs/tests/AVStreams/Full_Profile/run_test.pl +++ b/TAO/orbsvcs/tests/AVStreams/Full_Profile/run_test.pl @@ -10,84 +10,95 @@ use PerlACE::Run_Test; # amount of delay between running the servers -$sleeptime = 6; +$sleeptime = 2; $status = 0; -unlink $nsior; - $nsior = PerlACE::LocalFile ("ns.ior"); +$outfile = PerlACE::LocalFile ("output"); $makefile = PerlACE::LocalFile ("Makefile"); +$debug = 0; -$NS = new PerlACE::Process ("../../../Naming_Service/Naming_Service", "-o $nsior"); -$SV = new PerlACE::Process ("server", "-ORBInitRef NameService=file://$nsior -f udp_output"); -$CL = new PerlACE::Process ("ftp", "-ORBInitRef NameService=file://$nsior -f $makefile"); - -print STDERR "Starting Naming Service\n"; - -$NS->Spawn (); +unlink $nsior; -if (PerlACE::waitforfile_timed ($nsior, 5) == -1) { - print STDERR "ERROR: cannot find naming service IOR file\n"; - $NS->Kill (); - exit 1; -} -print STDERR "Using UDP protocol\n"; -print STDERR "Starting Server\n"; +@protocols = ("TCP", + "UDP" + ); -$SV->Spawn (); +for ($i = 0; $i <= $#ARGV; $i++) +{ + if ($ARGV[$i] eq "-h" || $ARGV[$i] eq "-?") + { + print STDERR "\nusage: run_test\n"; -sleep $sleeptime; + print STDERR "\t-h shows options menu\n"; -print STDERR "Starting Client\n"; + print STDERR "\t-d: Debug Level defaults to 0"; -$client = $CL->SpawnWaitKill (60); + print STDERR "\n"; -if ($client != 0) { - print STDERR "ERROR: client returned $client\n"; - $status = 1; + exit; + } + elsif ($ARGV[$i] eq "-d") + { + $debug = $ARGV[$i + 1]; + $i++; + } } -$server = $SV->TerminateWaitKill (5); - -if ($server != 0) { - print STDERR "ERROR: server returned $server\n"; - $status = 1; -} - -unlink $SV; -unlink $CL; - -$SV = new PerlACE::Process ("server", "-ORBInitRef NameService=file://$nsior -f tcp_output"); -$CL = new PerlACE::Process ("ftp", "-ORBInitRef NameService=file://$nsior -p TCP -f $makefile"); - -print STDERR "Using TCP protocol\n"; -print STDERR "Starting Server\n"; - -$SV->Spawn (); - -sleep $sleeptime; +$NS = new PerlACE::Process ("../../../Naming_Service/Naming_Service", "-o $nsior"); -print STDERR "Starting Client\n"; +print STDERR "Starting Naming Service\n"; -$client = $CL->SpawnWaitKill (60); +$NS->Spawn (); -if ($client != 0) { - print STDERR "ERROR: client returned $client\n"; - $status = 1; +if (PerlACE::waitforfile_timed ($nsior, 10) == -1) +{ + print STDERR "ERROR: cannot find naming service IOR file\n"; + $NS->Kill (); + exit 1; } -$server = $SV->TerminateWaitKill (5); - -if ($server != 0) { - print STDERR "ERROR: server returned $server\n"; - $status = 1; +$output_file = "TCP_output"; + +for $protocol (@protocols) +{ + if ($protocol eq "RTP/UDP") + { + $output_file = "RTP_output"; + } + 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 $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; + } } -unlink $SV; -unlink $CL; - $nserver = $NS->TerminateWaitKill (5); if ($nserver != 0) { @@ -96,5 +107,6 @@ if ($nserver != 0) { } unlink $nsior; +unlink $output; exit $status; |