diff options
author | Jordan Henderson <jhenderson@hdfgroup.org> | 2017-03-10 15:11:49 (GMT) |
---|---|---|
committer | Jordan Henderson <jhenderson@hdfgroup.org> | 2017-03-10 15:11:49 (GMT) |
commit | c3663d13d5becf8b3eaed18679f2349bd6ab971a (patch) | |
tree | 342f53c024764475c96e156c86ea515aa80f8bf0 /config/cmake/vfdTest.cmake | |
parent | 281c24a5a91b16eaf498e5dd5af783773c228758 (diff) | |
parent | 56e5b4ed05fb3bad51c226ec5b567871a45e0bce (diff) | |
download | hdf5-c3663d13d5becf8b3eaed18679f2349bd6ab971a.zip hdf5-c3663d13d5becf8b3eaed18679f2349bd6ab971a.tar.gz hdf5-c3663d13d5becf8b3eaed18679f2349bd6ab971a.tar.bz2 |
Merge pull request #2 in ~JHENDERSON/hdf5 from HDFFV/hdf5:develop to feature/parallel_filters
* commit '56e5b4ed05fb3bad51c226ec5b567871a45e0bce': (112 commits)
updated AM_SILENT_RULES syntax
Added a check for AM_SILENT_RULES before enabling it.
Fix alignment
Fix vds tests
Correct result code for strings test
Add extension to filename
HDFFV-10128 fix string compare and add tests
Description: Only format changes: mostly tabs vs. spaces Platforms tested: Linux/64 (jelly) - very minor
Lowercase math and set CMake commands
Added "flush" and "refresh" to testflushrefresh.sh error output so it's easier to see where errors in the script occur.
Misc. small cleanups to sync against incoming page buffering changes.
Update CMake formatting
Update CMake files and formatting
Normalize against incoming page buffering changes.
HDFFV-10120 verify nozlib checking with tools tests
cmake non-code typo
Correct issues from pull request reviews.
Corrected version of 4b5e05c084f93c35dae946c2c9e814d565a613b0: Fix some more signed -> unsigned value issues with cache data structures, also misc. style cleanups. All to align w/incoming page_buffering changes.
Revert "Fix some more signed -> unsigned value issues with cache data structures, also"
Added virtual to list
...
Diffstat (limited to 'config/cmake/vfdTest.cmake')
-rw-r--r-- | config/cmake/vfdTest.cmake | 45 |
1 files changed, 30 insertions, 15 deletions
diff --git a/config/cmake/vfdTest.cmake b/config/cmake/vfdTest.cmake index 10f0a7b..c9b4ecc 100644 --- a/config/cmake/vfdTest.cmake +++ b/config/cmake/vfdTest.cmake @@ -4,29 +4,36 @@ # arguments checking if (NOT TEST_PROGRAM) message (FATAL_ERROR "Require TEST_PROGRAM to be defined") -endif (NOT TEST_PROGRAM) -#if (NOT TEST_ARGS) -# message (STATUS "Require TEST_ARGS to be defined") -#endif (NOT TEST_ARGS) -#if (NOT TEST_EXPECT) -# message (STATUS "Require TEST_EXPECT to be defined") -#endif (NOT TEST_EXPECT) +endif () if (NOT TEST_FOLDER) message ( FATAL_ERROR "Require TEST_FOLDER to be defined") -endif (NOT TEST_FOLDER) +endif () if (NOT TEST_VFD) message (FATAL_ERROR "Require TEST_VFD to be defined") -endif (NOT TEST_VFD) +endif () -set (ERROR_APPEND 1) +if (EXISTS ${TEST_FOLDER}/${TEST_OUTPUT}) + file (REMOVE ${TEST_FOLDER}/${TEST_OUTPUT}) +endif () + +if (EXISTS ${TEST_FOLDER}/${TEST_OUTPUT}.err) + file (REMOVE ${TEST_FOLDER}/${TEST_OUTPUT}.err) +endif () + +# if there is not an error reference file add the error output to the stdout file +if (NOT TEST_ERRREF) + set (ERROR_APPEND 1) +endif () message (STATUS "USING ${TEST_VFD} ON COMMAND: ${TEST_PROGRAM} ${TEST_ARGS}") set (ENV{HDF5_DRIVER} "${TEST_VFD}") + # run the test program, capture the stdout/stderr and the result var -EXECUTE_PROCESS ( +execute_process ( COMMAND ${TEST_PROGRAM} ${TEST_ARGS} WORKING_DIRECTORY ${TEST_FOLDER} + RESULT_VARIABLE TEST_RESULT OUTPUT_FILE ${TEST_OUTPUT}_${TEST_VFD}.out ERROR_FILE ${TEST_OUTPUT}_${TEST_VFD}.err OUTPUT_VARIABLE TEST_OUT @@ -35,16 +42,24 @@ EXECUTE_PROCESS ( message (STATUS "COMMAND Result: ${TEST_RESULT}") +# if the .err file exists and ERRROR_APPEND is enabled if (ERROR_APPEND AND EXISTS ${TEST_FOLDER}/${TEST_OUTPUT}_${TEST_VFD}.err) file (READ ${TEST_FOLDER}/${TEST_OUTPUT}_${TEST_VFD}.err TEST_STREAM) file (APPEND ${TEST_FOLDER}/${TEST_OUTPUT}_${TEST_VFD}.out "${TEST_STREAM}") -endif (ERROR_APPEND AND EXISTS ${TEST_FOLDER}/${TEST_OUTPUT}_${TEST_VFD}.err) +endif () # if the return value is !=${TEST_EXPECT} bail out if (NOT ${TEST_RESULT} STREQUAL ${TEST_EXPECT}) - message ( FATAL_ERROR "Failed: Test program ${TEST_PROGRAM} exited != ${TEST_EXPECT}.\n${TEST_ERROR}") -endif (NOT ${TEST_RESULT} STREQUAL ${TEST_EXPECT}) + if (NOT TEST_NOERRDISPLAY) + if (EXISTS ${TEST_FOLDER}/${TEST_OUTPUT}_${TEST_VFD}.out) + file (READ ${TEST_FOLDER}/${TEST_OUTPUT}_${TEST_VFD}.out TEST_STREAM) + message (STATUS "Output USING ${TEST_VFD}:\n${TEST_STREAM}") + endif () + endif () + message (FATAL_ERROR "Failed: Test program ${TEST_PROGRAM} exited != ${TEST_EXPECT}.\n${TEST_ERROR}") +endif () + +message (STATUS "COMMAND Error: ${TEST_ERROR}") # everything went fine... message ("Passed: The ${TEST_PROGRAM} program used vfd ${TEST_VFD}") - |