mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-01-18 15:15:56 +08:00
[svn-r29418] Add compare to expected to script to verify correct operation of test
This commit is contained in:
parent
f56bf61b8c
commit
5a344710ba
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user