From 01eb265261fa3118a89c14950797b9e2c1a7d90a Mon Sep 17 00:00:00 2001 From: Paul Harten Date: Wed, 30 Dec 1998 16:15:03 -0500 Subject: [svn-r1000] Purpose: Conform closer to other test print-out. Problem: Multiple "PASSED" statements for single test results when test involves conversion of multiple files. Should be single "PASSED" statement for test results. Solution: "*FAILED*" statement given if conversion fails for any file. Differences given between expected results and actual results for each file that fails. "PASSED" statement given when conversion is successful for all files. Platform tested: Solaris2.5 --- tools/testh5toh4 | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/tools/testh5toh4 b/tools/testh5toh4 index 3210080..87f3ef3 100644 --- a/tools/testh5toh4 +++ b/tools/testh5toh4 @@ -39,6 +39,7 @@ CONVERT() "-m") + multirun=passed shift for i in $@ do @@ -61,10 +62,13 @@ CONVERT() tr '\n' ' ' <$expect |tr -s ' \t' |fold >$expect-norm if $cmp $expect-norm $actual-norm; then - echo " PASSED" - else - echo "*FAILED*" - echo " Actual result (*.tmp) differs from expected result (*.dmp)" + set unrelated + else + if test "passed" = "$multirun"; then + echo "*FAILED*" + echo " Actual result (*.tmp) differs from expected result (*.dmp)" + multirun=failed + fi nerrors="`expr $nerrors + 1`" test yes = "$verbose" && $diff $expect $actual |sed 's/^/ /' fi @@ -75,6 +79,9 @@ CONVERT() rm -f $actual fi done + if test "passed" = "$multirun"; then + echo " PASSED" + fi ;; -- cgit v0.12