---
 test/compare_table.pl                         |    8 +++++++-
 test/regression/test-cepview.sh               |    2 +-
 test/regression/test-sphinx_fe-ctl.sh         |    4 ++++
 test/regression/test-sphinx_fe-dct.sh         |    4 ++++
 test/regression/test-sphinx_fe-dither-seed.sh |    4 ++++
 test/regression/test-sphinx_fe-logspec.sh     |    4 ++++
 test/regression/test-sphinx_fe-logspec2cep.sh |    4 ++++
 test/regression/test-sphinx_fe-smoothspec.sh  |    4 ++++
 test/regression/test-sphinx_fe.sh             |    4 ++++
 test/regression/test-sphinx_jsgf2fsg.sh       |    3 +++
 test/regression/test-sphinx_pitch.sh          |    4 ++++
 11 files changed, 43 insertions(+), 2 deletions(-)

--- a/test/regression/test-sphinx_fe-ctl.sh
+++ b/test/regression/test-sphinx_fe-ctl.sh
@@ -58,3 +58,7 @@ run_program sphinx_cepview/sphinx_cepvie
 > test-sphinx_fe.cepview 2>>$tmpout
 
 compare_table "WAVE2FEAT test" test-sphinx_fe.cepview $tests/regression/chan3.cepview 0.1
+
+if test x"$failures" != x; then
+  cat $tmpout 1>&2
+fi
--- a/test/compare_table.pl
+++ b/test/compare_table.pl
@@ -54,6 +54,7 @@ if ((open (FN1, "<$fn1")) and (open (FN2
     # If the number of tokens in each line is different, the lines,
     # and therefore the files, don't match.
     if ($#field1 != $#field2) {
+      print STDERR "on '$line1' and '$line2', $#field1 != $#field2";
       $comparison = 0;
       last;
     }
@@ -64,6 +65,7 @@ if ((open (FN1, "<$fn1")) and (open (FN2
 	# Check if any of the tokens in the line is a string rather
 	# than a number, and compare the strings
 	if ($field1[$i] ne $field2[$i]) {
+          print STDERR "on '$line1' and '$line2', $field1[$i] != $field2[$i]";
 	  $comparison = 0;
 	  last;
 	}
@@ -71,6 +73,7 @@ if ((open (FN1, "<$fn1")) and (open (FN2
 	  # If the tokens are both numbers, check if they match within
 	  # a tolerance
 	  if (abs($field1[$i] - $field2[$i]) > $tolerance) {
+              print STDERR "on '$line1' and '$line2', $field1[$i] !~= $field2[$i]";
 	      $comparison = 0;
 	      last;
 	  }
@@ -81,7 +84,10 @@ if ((open (FN1, "<$fn1")) and (open (FN2
   }
   # If the files don't have the same number of lines, one of the
   # lines will be EOF, and the other won't.
-  $comparison = 0 if ($line1 != $line2);
+  if ($line1 != $line2) {
+    print STDERR "not the same number of line: '$line1' vs '$line2'";
+    $comparison = 0;
+  }
 }
 
 close(FN1);
--- a/test/regression/test-cepview.sh
+++ b/test/regression/test-cepview.sh
@@ -9,6 +9,6 @@ run_program sphinx_cepview/sphinx_cepvie
 -d 13 \
 -f $tests/regression/chan3.mfc \
 > $tmpout 2>test-cepview.err
-if diff -w $tmpout $tests/regression/chan3.cepview > /dev/null 2>&1; then
+if diff -w $tmpout $tests/regression/chan3.cepview 1>&2; then
 pass "CEPVIEW test"; else
 fail "CEPVIEW test"; fi
--- a/test/regression/test-sphinx_fe-dct.sh
+++ b/test/regression/test-sphinx_fe-dct.sh
@@ -28,3 +28,7 @@ run_program sphinx_cepview/sphinx_cepvie
 
 compare_table "WAVE2FEAT-DCT INVERTIBLE test" test-sphinx_fe-dct.cepview.out \
     $tests/regression/chan3.cepview
+
+if test x"$failures" != x; then
+  cat $tmpout 1>&2
+fi
--- a/test/regression/test-sphinx_fe-dither-seed.sh
+++ b/test/regression/test-sphinx_fe-dither-seed.sh
@@ -32,3 +32,7 @@ run_program sphinx_cepview/sphinx_cepvie
 
 compare_table "WAVE2FEAT-DITHER-SEED test" test-sphinx_fe-dither-seed.cepview.out \
     $tests/regression/chan3-dither.cepview 0.1
+
+if test x"$failures" != x; then
+  cat $tmpout 1>&2
+fi
--- a/test/regression/test-sphinx_fe-logspec.sh
+++ b/test/regression/test-sphinx_fe-logspec.sh
@@ -28,3 +28,7 @@ run_program sphinx_cepview/sphinx_cepvie
 
 compare_table "WAVE2FEAT-LOGSPEC test" test-sphinx_fe-logspec.cepview.out \
     $tests/regression/chan3-logspec.cepview 0.2
+
+if test x"$failures" != x; then
+  cat $tmpout 1>&2
+fi
--- a/test/regression/test-sphinx_fe-logspec2cep.sh
+++ b/test/regression/test-sphinx_fe-logspec2cep.sh
@@ -19,3 +19,7 @@ run_program sphinx_cepview/sphinx_cepvie
 
 compare_table "WAVE2FEAT-LOGSPEC2CEP test" test-sphinx_fe-logspec2cep.cepview.out \
     $tests/regression/chan3.cepview
+
+if test x"$failures" != x; then
+  cat $tmpout 1>&2
+fi
--- a/test/regression/test-sphinx_fe-smoothspec.sh
+++ b/test/regression/test-sphinx_fe-smoothspec.sh
@@ -28,3 +28,7 @@ run_program sphinx_cepview/sphinx_cepvie
 
 compare_table "WAVE2FEAT-SMOOTHSPEC test" test-sphinx_fe-smoothspec.cepview.out \
     $tests/regression/chan3-smoothspec.cepview 0.1
+
+if test x"$failures" != x; then
+  cat $tmpout 1>&2
+fi
--- a/test/regression/test-sphinx_fe.sh
+++ b/test/regression/test-sphinx_fe.sh
@@ -27,3 +27,7 @@ run_program sphinx_cepview/sphinx_cepvie
 > test-sphinx_fe.cepview 2>>$tmpout
 
 compare_table "WAVE2FEAT test" test-sphinx_fe.cepview $tests/regression/chan3.cepview 0.1
+
+if test x"$failures" != x; then
+  cat $tmpout 1>&2
+fi
--- a/test/regression/test-sphinx_jsgf2fsg.sh
+++ b/test/regression/test-sphinx_jsgf2fsg.sh
@@ -15,3 +15,6 @@ for r in $rules; do
     compare_table $r $r.out $tests/regression/$r.fsg
 done
 
+if test x"$failures" != x; then
+  cat $tmpout 1>&2
+fi
--- a/test/regression/test-sphinx_pitch.sh
+++ b/test/regression/test-sphinx_pitch.sh
@@ -12,3 +12,7 @@ run_program sphinx_adtools/sphinx_pitch
 -raw yes > $tmpout 2>&1 
 
 compare_table "PITCH test" test-sphinx_pitch.f0 $tests/regression/chan3.f0 0.1
+
+if test x"$failures" != x; then
+  cat $tmpout 1>&2
+fi
