diff options
author | dbudko <dbudko@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2009-12-10 10:34:08 +0000 |
---|---|---|
committer | dbudko <dbudko@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2009-12-10 10:34:08 +0000 |
commit | 8b3f532565a0fb61892871155c0680bb85d31797 (patch) | |
tree | 67142270959c9e85bfd500a6e6e04d0ac1d02c71 /TAO/orbsvcs/tests/Notify/performance-tests/scripts/Paths_vs_Throughput/run_notify.pl | |
parent | 137b9d881bba48bc1c3d501a0f468e06ff30ac62 (diff) | |
download | ATCD-8b3f532565a0fb61892871155c0680bb85d31797.tar.gz |
Thu Dec 10 10:32:56 UTC 2009 Denis Budko <denis.budko@remedy.nl>
* orbsvcs/tests/Bug_1436_Regression/run_test.pl:
* orbsvcs/tests/Notify/performance-tests/scripts/1_Path_Period_0_Lanes/run_test.pl:
* orbsvcs/tests/Notify/performance-tests/scripts/Paths_vs_Throughput/run_notify.pl:
* orbsvcs/tests/Notify/performance-tests/scripts/Paths_vs_Throughput/run_high_path.pl:
* orbsvcs/tests/Notify/performance-tests/scripts/Paths_vs_Throughput/run_test.pl:
* orbsvcs/tests/Notify/performance-tests/scripts/Paths_vs_Throughput/run_other_paths.pl:
* orbsvcs/tests/Notify/performance-tests/scripts/3_Path_Period_10ms_Lanes/run_test.pl:
* orbsvcs/tests/Notify/performance-tests/scripts/Max_Throughput/Notify_RTCORBA/run_test.pl:
* orbsvcs/tests/Notify/performance-tests/scripts/Max_Throughput/3_Hops_RTCORBA/run_test.pl:
* orbsvcs/tests/Notify/performance-tests/scripts/Max_Throughput/Notify/run_test.pl:
* orbsvcs/tests/Notify/performance-tests/scripts/Max_Throughput/3_Hops/run_test.pl:
* orbsvcs/tests/FT_App/run_test_demo.pl:
* orbsvcs/tests/FT_App/run_test_fault_consumer.pl:
* orbsvcs/tests/FT_App/run_test_detector.pl:
* orbsvcs/tests/Event/Mcast/Complex/run_test.pl:
* orbsvcs/tests/Bug_2248_Regression/client.cpp:
* orbsvcs/tests/InterfaceRepo/IFR_Inheritance_Test/main.cpp:
* orbsvcs/tests/InterfaceRepo/IFR_Inheritance_Test/run_test.pl:
* orbsvcs/tests/Bug_1437_Regression/run_test.pl:
Tests are converted to use new test framework
and added to fuzz build.
Diffstat (limited to 'TAO/orbsvcs/tests/Notify/performance-tests/scripts/Paths_vs_Throughput/run_notify.pl')
-rwxr-xr-x | TAO/orbsvcs/tests/Notify/performance-tests/scripts/Paths_vs_Throughput/run_notify.pl | 137 |
1 files changed, 76 insertions, 61 deletions
diff --git a/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Paths_vs_Throughput/run_notify.pl b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Paths_vs_Throughput/run_notify.pl index b954d95b3b5..c3429f9f78a 100755 --- a/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Paths_vs_Throughput/run_notify.pl +++ b/TAO/orbsvcs/tests/Notify/performance-tests/scripts/Paths_vs_Throughput/run_notify.pl @@ -1,100 +1,115 @@ eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' - & eval 'exec perl -S $0 $argv:q' - if 0; + & eval 'exec perl -S $0 $argv:q' + if 0; # $Id$ # -*- perl -*- use lib "$ENV{ACE_ROOT}/bin"; -use PerlACE::Run_Test; +use PerlACE::TestTarget; use File::Copy; use Getopt::Std; PerlACE::check_privilege_group(); +$status = 0; +$debug_level = '0'; + +foreach $i (@ARGV) { + if ($i eq '-debug') { + $debug_level = '10'; + } +} + # -n notify.conf -s high_path.conf -c other_paths.conf -o output_dir -h getopts ("n:s:c:o:h"); -if ($opt_h) -{ +if ($opt_h) { + $opt_h = 0; #to disable fuxx.pl warning only print STDERR "-n notify.conf -s high_path.conf -c other_paths.conf -o output_dir -h\n"; exit 0; } -$experiment_timeout = 600; -$startup_timeout = 120; - -if ($opt_n) -{ - $notify_conf = PerlACE::LocalFile ($opt_n); - -}else -{ - $notify_conf = PerlACE::LocalFile ("notify.conf"); +$nt_conf = "notify.conf"; +if ($opt_n) { + $nt_conf = $opt_n; } -if ($opt_s) -{ - $high_path_conf = PerlACE::LocalFile ($opt_s); - -}else -{ - $high_path_conf = PerlACE::LocalFile ("high_path.conf"); +$high_path_conf = "high_path.conf"; +if ($opt_s) { + $high_path_conf = $opt_s; } -if ($opt_c) -{ - $other_paths_conf = PerlACE::LocalFile ($opt_c); - -}else -{ - $other_paths_conf = PerlACE::LocalFile ("other_paths.conf"); +$other_paths_conf = "other_paths.conf"; +if ($opt_c) { + $other_paths_conf = $opt_c; } -$notify_ior = PerlACE::LocalFile ("notify.ior"); +my $nm_service = PerlACE::TestTarget::create_target (1) || die "Create target 1 failed\n"; +my $nt_service = PerlACE::TestTarget::create_target (2) || die "Create target 2 failed\n"; -$naming_ior = PerlACE::LocalFile ("naming.ior"); +#uncomment it when test will be fixed +#@list = glob("*.dat"); +#for $file (@list) { +# $nm_service->DeleteFile ($file); +# $nt_service->DeleteFile ($file); +#} -$high_path_ior = PerlACE::LocalFile ("high_path.ior"); +my $nm_ior = "naming.ior"; +my $nt_ior = "notify.ior"; -@list=glob("*.dat"); -for $file (@list) -{ - unlink $file or die "Could not delete $file"; -} +my $nt_service_nt_conf = $nt_service->LocalFile($nt_conf); +my $nm_service_nm_ior = $nm_service->LocalFile($nm_ior); +my $nt_service_nm_ior = $nt_service->LocalFile($nm_ior); +my $nt_service_nt_ior = $nt_service->LocalFile($nt_ior); +$nm_service->DeleteFile($nm_ior); +$nt_service->DeleteFile($nm_ior); +$nt_service->DeleteFile($nt_ior); -$status = 0; +$NM_SV = $nm_service->CreateProcess ("../../../../../Naming_Service/Naming_Service", + "-ORBDebugLevel $debug_level -o $nm_service_nm_ior"); -$Naming = new PerlACE::Process ("../../../../../Naming_Service/Naming_Service", - "-o $naming_ior"); +$NT_SV = $nt_service->CreateProcess ("../../../../../Notify_Service/Notify_Service", + "-ORBInitRef NameService=file://$nt_service_nm_ior ". + "-IORoutput $nt_service_nt_ior ". + "-ORBSvcConf $nt_service_nt_conf ". + "-ORBDebugLevel $debug_level"); -$Notification = new PerlACE::Process ("../../../../../Notify_Service/Notify_Service"); +$service_status = $NM_SV->Spawn (); -#$Notify_Args = "-ORBInitRef NameService=file://$naming_ior -IORoutput $notify_ior -ORBSvcConf $notify_conf -ORBDebugLevel 1"; +if ($service_status != 0) { + print STDERR "ERROR: naming service returned $service_status\n"; + exit 1; +} -$Notify_Args = "-ORBInitRef NameService=file://$naming_ior -IORoutput $notify_ior -ORBSvcConf $notify_conf"; +if ($nm_service->WaitForFileTimed ($nm_ior, + $nm_service->ProcessStartWaitInterval() + 105) == -1) { + print STDERR "ERROR: cannot find file <$nm_service_nm_ior>\n"; + $NM_SV->Kill (); $NM_SV->TimedWait (1); + exit 1; +} -unlink $naming_ior; -$Naming->Spawn (); +if ($nm_service->GetFile ($nm_ior) == -1) { + print STDERR "ERROR: cannot retrieve file <$nm_service_nm_ior>\n"; + $NM_SV->Kill (); $NM_SV->TimedWait (1); + exit 1; +} -if (PerlACE::waitforfile_timed ($naming_ior, $startup_timeout) == -1) { - print STDERR "ERROR: waiting for the naming service to start\n"; - $Naming->Kill (); - exit 1; +if ($nt_service->PutFile ($nm_ior) == -1) { + print STDERR "ERROR: cannot set file <$nt_service_nm_ior>\n"; + $NM_SV->Kill (); $NM_SV->TimedWait (1); + exit 1; } -unlink $notify_ior; -$Notification->Arguments ($Notify_Args); -$args = $Notification->Arguments (); -print STDERR "Running Notification with arguments: $args\n"; -$status = $Notification->SpawnWaitKill ($experiment_timeout); - -if ($status != 0) - { - print STDERR "ERROR: Other_paths returned $status\n"; - $Notification->Kill (); - $Naming->Kill (); +$service_status = $NT_SV->SpawnWaitKill ($nt_service->ProcessStartWaitInterval() + 585); + +if ($service_status != 0) { + print STDERR "ERROR: notification service returned $service_status\n"; exit 1; - } +} + +$nm_service->DeleteFile($nm_ior); +$nt_service->DeleteFile($nm_ior); +$nt_service->DeleteFile($nt_ior); exit $status; |