diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2016-03-15 17:15:53 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2016-03-15 17:15:53 (GMT) |
commit | 56d8e3185551ce3f7249d49d0cd79b4174606303 (patch) | |
tree | 0365ec3f2996c83b846df5c71922d26ef6c22b4c /java | |
parent | b735db7955142799207aee3abf97b8a8bd8d292b (diff) | |
download | hdf5-56d8e3185551ce3f7249d49d0cd79b4174606303.zip hdf5-56d8e3185551ce3f7249d49d0cd79b4174606303.tar.gz hdf5-56d8e3185551ce3f7249d49d0cd79b4174606303.tar.bz2 |
[svn-r29420] Add compare to expected to script to verify correct operation of test
Diffstat (limited to 'java')
-rw-r--r-- | java/test/junit.sh.in | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/java/test/junit.sh.in b/java/test/junit.sh.in index 6878b3b..9473911 100644 --- a/java/test/junit.sh.in +++ b/java/test/junit.sh.in @@ -61,8 +61,14 @@ $top_builddir/java/src/$JARFILE " LIST_DATA_FILES=" $HDFTEST_HOME/h5ex_g_iterate.hdf +$HDFTEST_HOME/JUnit-interface.txt " +expect="JUnit-interface.txt" +actual="JUnit-interface.out" +actual_err="JUnit-interface.err" +actual_ext="JUnit-interface.ext" + # # copy files from source dirs to test dir # @@ -150,6 +156,9 @@ CLEAN_DATAFILES_AND_BLDDIR() if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then $RM $BLDDIR/*.hdf $RM $BLDDIR/*.out + $RM $BLDDIR/*.err + $RM $BLDDIR/*.ext + $RM $BLDDIR/*.txt fi } @@ -218,7 +227,26 @@ esac export LD_LIBRARY_PATH echo "$JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestAll" -($JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestAll) +($JAVAEXE $JAVAEXEFLAGS -Xmx1024M -Dorg.slf4j.simpleLogger.defaultLog=trace -Djava.library.path=$BLDLIBDIR -cp $CLASSPATH -ea org.junit.runner.JUnitCore test.TestAll 1>$actual_ext 2>$actual_err) + +# Extract file name, line number, version and thread IDs because they may be different +sed -e 's/thread [0-9]*/thread (IDs)/' -e 's/: .*\.c /: (file name) /' \ + -e 's/line [0-9]*/line (number)/' \ + -e 's/Time: [0-9]*\.[0-9]*/Time: XXXX/' \ + -e 's/v[1-9]*\.[0-9]*\./version (number)\./' \ + -e 's/[1-9]*\.[0-9]*\.[0-9]*[^)]*/version (number)/' \ + $actual_ext > $actual +cat $actual_err >> $actual + +if $CMP $expect $actual; then + echo " PASSED" +else + echo "*FAILED*" + echo " Expected result differs from actual result" + nerrors="`expr $nerrors + 1`" + test yes = "$verbose" && $DIFF $expect1 $actual |sed 's/^/ /' +fi + # Clean up temporary files/directories CLEAN_LIBFILES_AND_BLDLIBDIR |