[svn-r29450] Separate error compare from output compare

This commit is contained in:
Allen Byrne 2016-03-16 12:35:51 -05:00
parent 1f5286ddf2
commit 7f8f2feaf9
6 changed files with 9 additions and 7 deletions

View File

@ -2690,6 +2690,7 @@
./java/test/CMakeLists.txt
./java/test/junit.sh.in
./java/test/JUnit-interface.txt
./java/test/JUnit-interface.ert
./java/test/h5ex_g_iterate.hdf
./java/test/TestH5.java
./java/test/TestH5A.java

View File

@ -72,9 +72,9 @@ endif (EXISTS ${TEST_FOLDER}/${TEST_OUTPUT}.err)
if (TEST_MASK_ERROR)
if (NOT TEST_ERRREF)
file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
else (NOT TEST_ERRREF)
file (READ ${TEST_FOLDER}/${TEST_OUTPUT}.err TEST_STREAM)
else (NOT TEST_ERRREF)
file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
endif (NOT TEST_ERRREF)
string (REGEX REPLACE "Time:[^\n]+\n" "Time: XXXX\n" TEST_STREAM "${TEST_STREAM}")
string (REGEX REPLACE "thread [0-9]*:" "thread (IDs):" TEST_STREAM "${TEST_STREAM}")
@ -85,9 +85,9 @@ if (TEST_MASK_ERROR)
string (REGEX REPLACE "H5Eget_auto[1-2]*" "H5Eget_auto(1 or 2)" TEST_STREAM "${TEST_STREAM}")
string (REGEX REPLACE "H5Eset_auto[1-2]*" "H5Eset_auto(1 or 2)" TEST_STREAM "${TEST_STREAM}")
if (NOT TEST_ERRREF)
file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}")
else (NOT TEST_ERRREF)
file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT}.err "${TEST_STREAM}")
else (NOT TEST_ERRREF)
file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}")
endif (NOT TEST_ERRREF)
endif (TEST_MASK_ERROR)

View File

@ -65,6 +65,7 @@ set_target_properties (${HDF5_JAVA_TEST_LIB_TARGET} PROPERTIES FOLDER test/java)
set (HDF_JAVA_TEST_FILES
h5ex_g_iterate.hdf
JUnit-interface.txt
JUnit-interface.ert
)
foreach (h5_file ${HDF_JAVA_TEST_FILES})
@ -105,6 +106,7 @@ add_test (
-D "TEST_LIBRARY_DIRECTORY=${CMAKE_TEST_OUTPUT_DIRECTORY}"
-D "TEST_FOLDER=${HDF5_BINARY_DIR}/java/test"
-D "TEST_OUTPUT=JUnit-interface.out"
-D "TEST_ERRREF=JUnit-interface.ert"
# -D "TEST_LOG_LEVEL=trace"
-D "TEST_EXPECT=0"
-D "TEST_MASK_ERROR=TRUE"

View File

@ -0,0 +1,2 @@
[main] INFO hdf.hdf5lib.H5 - HDF5 library: hdf5_java
[main] INFO hdf.hdf5lib.H5 - successfully loaded from java.library.path

View File

@ -648,5 +648,3 @@ HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
#002: (file name) line (number) in H5P_isa_class(): not a property list
major: Invalid arguments to routine
minor: Inappropriate type
[main] INFO hdf.hdf5lib.H5 - HDF5 library: hdf5_java
[main] INFO hdf.hdf5lib.H5 - successfully loaded from java.library.path

View File

@ -237,7 +237,6 @@ sed -e 's/thread [0-9]*/thread (IDs)/' -e 's/: .*\.c /: (file name) /' \
-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"