diff options
author | elliott_c <ocielliottc@users.noreply.github.com> | 2004-12-17 14:48:40 +0000 |
---|---|---|
committer | elliott_c <ocielliottc@users.noreply.github.com> | 2004-12-17 14:48:40 +0000 |
commit | 293b58188abd26b2c4f5251dd80a7b49019c0ae8 (patch) | |
tree | ca91798bc8327232d64d06125201b61f3af2723c | |
parent | dda5cf62bcbc06a0a1a9edc172335eda509c4fe8 (diff) | |
download | ATCD-293b58188abd26b2c4f5251dd80a7b49019c0ae8.tar.gz |
ChangeLogTag: Fri Dec 17 08:47:05 2004 Chad Elliott <elliott_c@ociweb.com>
-rw-r--r-- | TAO/ChangeLog | 8 | ||||
-rwxr-xr-x | TAO/orbsvcs/tests/Bug_1437_Regression/run_test.pl | 49 |
2 files changed, 30 insertions, 27 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog index 366e239f16f..a1263a7a069 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -1,3 +1,11 @@ +Fri Dec 17 08:47:05 2004 Chad Elliott <elliott_c@ociweb.com> + + * orbsvcs/tests/Bug_1437_Regression/run_test.pl: + + Rewrote the tao_imr section to use perl to redirect the tao_imr + output and keyed the success of the test off of the return value + of tao_imr instead of parsing the output. + Fri Dec 17 08:15:18 2004 Chad Elliott <elliott_c@ociweb.com> * orbsvcs/IFR_Service/be_global.cpp: diff --git a/TAO/orbsvcs/tests/Bug_1437_Regression/run_test.pl b/TAO/orbsvcs/tests/Bug_1437_Regression/run_test.pl index 59ccd2b87a4..77ce97a7cbd 100755 --- a/TAO/orbsvcs/tests/Bug_1437_Regression/run_test.pl +++ b/TAO/orbsvcs/tests/Bug_1437_Regression/run_test.pl @@ -12,14 +12,7 @@ use PerlACE::Run_Test; $imr_bin_path = "../../ImplRepo_Service"; # The location of the tao_imr IMR utility -if ($^O eq "MSWin32") -{ - $tao_imr_bin_path = "../../../../bin"; -} -else -{ - $tao_imr_bin_path = $imr_bin_path; -} +$tao_imr_bin_path = "../../../../bin"; # IOR file names $imr_ior_file = PerlACE::LocalFile("impl.ior"); @@ -67,31 +60,33 @@ sub test_body $LOCATOR->Kill (); return 1; } - - # Add the persistent POA name to the IMR - $TAO_IMR->Arguments("-ORBInitRef ImplRepoService=file://$imr_ior_file &> $log_file add \"\""); + + # Redirect STDERR to a log file so that the ERROR + # message does not get printed to the terminal + open(SAVEERR, '>&STDERR'); + open(STDERR, ">$log_file"); + + # Add the illegal persistent POA name to the IMR + $TAO_IMR->Arguments("-ORBInitRef ImplRepoService=file://$imr_ior_file add \"\""); $result = $TAO_IMR->SpawnWaitKill (30); - - if (PerlACE::waitforfile_timed ($log_file, 10) == -1) - { - print STDERR "ERROR: cannot find $log_file\n"; - $ACTIVATOR->Kill (); - $LOCATOR->Kill (); - return 1; - } - $match = 0; - open (FILE, $log_file) or return -1; - while (<FILE>) { - $match = /must be at least one character long/; - last if $match; - } - close FILE; + # Close the log file and restore STDERR + close(STDERR); + open(STDERR, '>&SAVEERR'); + + # If the add of an empty string failed, then + # the test of the tao_imr succeeded. + if ($result != 0) { + $result = 0; + } + else { + $result = -1; + } # Tidy up $ACTIVATOR->TerminateWaitKill (5); $LOCATOR->TerminateWaitKill (5); - return $match ? 0 : -1; + return $result; } # Run regression for bug #1437 |