diff options
Diffstat (limited to 'TAO/orbsvcs/tests/Simple_Naming/run_test_ffp.pl')
-rwxr-xr-x | TAO/orbsvcs/tests/Simple_Naming/run_test_ffp.pl | 92 |
1 files changed, 54 insertions, 38 deletions
diff --git a/TAO/orbsvcs/tests/Simple_Naming/run_test_ffp.pl b/TAO/orbsvcs/tests/Simple_Naming/run_test_ffp.pl index 5ef2c750ed4..df18c6ccee3 100755 --- a/TAO/orbsvcs/tests/Simple_Naming/run_test_ffp.pl +++ b/TAO/orbsvcs/tests/Simple_Naming/run_test_ffp.pl @@ -37,6 +37,7 @@ $persistent_ior_file = "pns.ior"; my $test_iorfile = $test->LocalFile ($iorfile); my $test_persistent_ior_file = $test->LocalFile ($persistent_ior_file); +my $prog = "../../Naming_Service/tao_cosnaming"; $test->DeleteFile($iorfile); $test->DeleteFile($persistent_ior_file); @@ -44,7 +45,7 @@ $test->DeleteFile($persistent_ior_file); sub name_server { my $args = "-ORBNameServicePort $ns_multicast_port -o $test_iorfile -m 1 @_"; - my $prog = "../../Naming_Service/tao_cosnaming"; + $SV = $test->CreateProcess ("$prog", "$args"); @@ -95,14 +96,50 @@ $hostname = $test->HostName (); "Flat File Persistent Test (Part 2): \n", "Flat File Persistent Test (Part 3): \n"); -$test_number = 0; -$test->DeleteFile($test_persistent_ior_file); +sub run_test +{ + $prog = "@_"; + + $test_number = 0; + + $test->DeleteFile($test_persistent_ior_file); + + if ( ! -d "NameService" ) { + mkdir (NameService, 0777); + } + else { + chdir "NameService"; + opendir(THISDIR, "."); + @allfiles = grep(!/^\.\.?$/, readdir(THISDIR)); + closedir(THISDIR); + foreach $tmp (@allfiles){ + $test->DeleteFile ($tmp); + } + chdir ".."; + } + + # Run server and client for each of the tests. Client uses ior in a + # file to bootstrap to the server. + foreach $o (@opts) { + name_server ($server_opts[$test_number]); + + print STDERR "\n ".$comments[$test_number]; + + client ($o); + + $SV->Kill (); + + ## For some reason, only on Windows XP, we need to + ## wait before starting another tao_cosnaming when + ## the mmap persistence option is used + if ($^O eq "MSWin32") { + sleep(1); + } + + $test_number++; + } -if ( ! -d "NameService" ) { - mkdir (NameService, 0777); -} -else { chdir "NameService"; opendir(THISDIR, "."); @allfiles = grep(!/^\.\.?$/, readdir(THISDIR)); @@ -111,40 +148,19 @@ else { $test->DeleteFile ($tmp); } chdir ".."; -} - -# Run server and client for each of the tests. Client uses ior in a -# file to bootstrap to the server. -foreach $o (@opts) { - name_server ($server_opts[$test_number]); - - print STDERR "\n ".$comments[$test_number]; + rmdir "NameService"; - client ($o); - - $SV->Kill (); - - ## For some reason, only on Windows XP, we need to - ## wait before starting another tao_cosnaming when - ## the mmap persistence option is used - if ($^O eq "MSWin32") { - sleep(1); - } - - $test_number++; + $test->DeleteFile($persistent_ior_file); + $test->DeleteFile($iorfile); } -chdir "NameService"; -opendir(THISDIR, "."); -@allfiles = grep(!/^\.\.?$/, readdir(THISDIR)); -closedir(THISDIR); -foreach $tmp (@allfiles){ - $test->DeleteFile ($tmp); -} -chdir ".."; -rmdir "NameService"; +@server_exes = ("../../Naming_Service/tao_cosnaming", + "../../Naming_Service/tao_ft_naming"); -$test->DeleteFile($persistent_ior_file); -$test->DeleteFile($iorfile); +foreach $e (@server_exes) { + print STDERR "Testing Naming Service Executable: $e\n"; + run_test($e); + print STDERR "======================================\n"; +} exit $status; |