Make sure all tests are executed before an error code is reported to make.
authordrepper <drepper>
Mon, 16 Jun 2003 07:25:07 +0000 (07:25 +0000)
committerdrepper <drepper>
Mon, 16 Jun 2003 07:25:07 +0000 (07:25 +0000)
localedata/tst-fmon.sh
localedata/tst-numeric.sh

index e58db1d..c8b6d69 100755 (executable)
@@ -39,25 +39,26 @@ for cns in `cd ./tst-fmon-locales && ls tstfmon_*`; do
 done
 
 # Run the tests.
+errcode=0
 # There's a TAB for IFS
 while IFS="    " read locale format value expect; do
     case "$locale" in '#'*) continue ;; esac
     if [ -n "$format" ]; then
-       LOCPATH=${common_objpfx}localedata \
-       GCONV_PATH=${common_objpfx}/iconvdata \
-       ${run_program_prefix} ${common_objpfx}localedata/tst-fmon \
-           "$locale" "$format" "$value" "$expect"
-       if [ $? -eq 0 ]; then
+       if LOCPATH=${common_objpfx}localedata \
+          GCONV_PATH=${common_objpfx}/iconvdata \
+          ${run_program_prefix} ${common_objpfx}localedata/tst-fmon \
+          "$locale" "$format" "$value" "$expect" ; then
            echo "Locale: \"${locale}\" Format: \"${format}\"" \
                 "Value: \"${value}\" Expect: \"${expect}\"  passed"
        else
+           errcode=$?
            echo "Locale: \"${locale}\" Format: \"${format}\"" \
                 "Value: \"${value}\" Expect: \"${expect}\"    failed"
        fi
     fi
 done < $datafile
 
-exit $?
+exit $errcode
 # Local Variables:
 #  mode:shell-script
 # End:
index f590dfd..f27eacd 100644 (file)
@@ -25,25 +25,27 @@ run_program_prefix=$2
 datafile=$3
 
 # Run the tests.
+errcode=0
 # There's a TAB for IFS
 while IFS="    " read locale format value expect; do
     case "$locale" in '#'*) continue ;; esac
     if [ -n "$format" ]; then
-       LOCPATH=${common_objpfx}localedata \
-       GCONV_PATH=${common_objpfx}/iconvdata \
-       ${run_program_prefix} ${common_objpfx}localedata/tst-numeric \
+       if LOCPATH=${common_objpfx}localedata \
+           GCONV_PATH=${common_objpfx}/iconvdata \
+           ${run_program_prefix} ${common_objpfx}localedata/tst-numeric \
            "$locale" "$format" "$value" "$expect"
-       if [ $? -eq 0 ]; then
+       then
            echo "Locale: \"${locale}\" Format: \"${format}\"" \
                 "Value: \"${value}\" Expect: \"${expect}\"  passed"
        else
+           errcode=$?
            echo "Locale: \"${locale}\" Format: \"${format}\"" \
                 "Value: \"${value}\" Expect: \"${expect}\"    failed"
        fi
     fi
 done < $datafile
 
-exit $?
+exit $errcode
 # Local Variables:
 #  mode:shell-script
 # End: