summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2013-03-29 20:22:40 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2013-03-29 20:22:40 (GMT)
commit59bb6d185e4e8afd65af4f33dec5c13627c9f8b7 (patch)
tree52d0f71aa096673217ebb9a147e44a6344eff302
parentc1c11c021b09a8deefb1fd08e133e716080bc69e (diff)
downloadhdf5-59bb6d185e4e8afd65af4f33dec5c13627c9f8b7.zip
hdf5-59bb6d185e4e8afd65af4f33dec5c13627c9f8b7.tar.gz
hdf5-59bb6d185e4e8afd65af4f33dec5c13627c9f8b7.tar.bz2
[svn-r23492] Bug fix:
Test was not checking error result. It basically return succeess to make check all the time. Fixed it so that it does check the return code of the test (plugin) and set nerror accordingly. It then exit 1 if there is any error detected. Test: use the desy committest to pass on jam, koala, ostrich, duck and emu. Also hand test by "rm test/.lib/libdynlib1* to verify the test script can indeed response to errors properly.
-rw-r--r--test/test_plugin.sh.in19
1 files changed, 13 insertions, 6 deletions
diff --git a/test/test_plugin.sh.in b/test/test_plugin.sh.in
index f2f3a1a..630a689 100644
--- a/test/test_plugin.sh.in
+++ b/test/test_plugin.sh.in
@@ -34,9 +34,6 @@ TEST_NAME=plugin
TEST_BIN=`pwd`/$TEST_NAME
ENVCMD="env HDF5_PLUGIN_PATH=`pwd`/.libs"
-# Run the test
-$ENVCMD $TEST_BIN
-
# Print a line-line message left justified in a field of 70 characters
# beginning with the word "Testing".
#
@@ -45,8 +42,18 @@ TESTING() {
echo "Testing $* $SPACES" | cut -c1-70 | tr -d '\012'
}
-if test $nerrors -eq 0 ; then
- echo "All Plugin API tests passed."
+# Main Body
+# Run the test
+$ENVCMD $TEST_BIN
+if [ $? != 0 ]; then
+ nerrors=`expr $nerrors + 1`
fi
-exit $nerrors
+# print results
+if test $nerrors -ne 0 ; then
+ echo "$nerrors errors encountered"
+ exit 1
+else
+ echo "All Plugin API tests passed."
+ exit 0
+fi