Fix filters tools testing and ZFP tools tests#223
Conversation
| set (ENV{LD_LIBRARY_PATH} "$ENV{LD_LIBRARY_PATH}:${TEST_LIBRARY_DIRECTORY}") | ||
| endif () | ||
| set (ENV{HDF5_PLUGIN_PATH} "${TEST_LIBRARY_DIRECTORY}/plugins:$ENV{HDF5_PLUGIN_PATH}") | ||
| set (ENV{HDF5_PLUGIN_PATH} "${TEST_LIBRARY_DIRECTORY}/plugins:${TEST_LIBRARY_DIRECTORY}/plugin:$ENV{HDF5_PLUGIN_PATH}") |
There was a problem hiding this comment.
plugin appears to be the actual directory name at this point, so updated many places. I left plugins in case there is some reason it's here that I'm not aware of.
| message (FATAL_ERROR "Require TEST_OUTPUT to be defined") | ||
| endif () | ||
| if (NOT TEST_EXPECT) | ||
| if (NOT DEFINED TEST_EXPECT) |
There was a problem hiding this comment.
This needs to be NOT DEFINED, otherwise when TEST_EXPECT is 0, this is treated as TRUE and prints out the misleading message below.
There was a problem hiding this comment.
This filter's DDL file was out of date from the data not being tested previously.
There was a problem hiding this comment.
This filter's DDL file was out of date from the data not being tested previously.
There was a problem hiding this comment.
The ZFP testing files were several years out of date.
| set_tests_properties (${testname} PROPERTIES DEPENDS ${testname}-clearall) | ||
| endif () | ||
| set (last_test "${testname}") | ||
| if (HDF5_BUILD_TOOLS) |
There was a problem hiding this comment.
Testing of the tools has been broken since 2.0.0 due to the change in name from HDF5_BUILD_TOOLS -> HDF5_PROVIDES_TOOLS. After fixing this, several tests were failing and needed fixed.
| OUTPUT_FILE ${TEST_OUTPUT} | ||
| ERROR_FILE ${TEST_OUTPUT}.err | ||
| OUTPUT_VARIABLE TEST_OUT | ||
| ERROR_VARIABLE TEST_ERROR |
There was a problem hiding this comment.
According to the latest CMake docs,
If more than one OUTPUT_* or ERROR_* option is given for the same pipe the precedence is not specified. If no OUTPUT_* or ERROR_* options are given the output will be shared with the corresponding pipes of the CMake process itself.
This had the effect that TEST_ERROR would be empty after stderr was redirected to ERROR_FILE ${TEST_OUTPUT}.err and no error output would show up in ctest, making it difficult to know why tests failed. This needs to be fixed in HDF5 as well, but in a slightly different manner.
| if (EXISTS "${TEST_FOLDER}/${TEST_OUTPUT}.err") | ||
| file (READ ${TEST_FOLDER}/${TEST_OUTPUT}.err TEST_STREAM) | ||
| list (LENGTH TEST_STREAM test_len) | ||
| file (READ ${TEST_FOLDER}/${TEST_OUTPUT}.err TEST_ERROR) |
There was a problem hiding this comment.
Rather than use ERROR_VARIABLE above, read the error output file into TEST_ERROR so it can be displayed correctly.
| else () | ||
| set (PLUGIN_RELATIVE_PATH "../../../lib/plugin") | ||
| set (_plugin_path "${PROJECT_SOURCE_DIR}/../../../lib/plugin") | ||
| set (_plugin_path "${_plugin_path}:${PROJECT_SOURCE_DIR}/../../../lib64/plugin") |
There was a problem hiding this comment.
ZFP gets installed to lib64 instead of lib, meaning more paths needed to be added here.
| -D "TEST_REFERENCE=${testname}.${resultfile}.tst" | ||
| -D "TEST_LIBRARY_DIRECTORY=${TESTLIBDIR}" | ||
| -D "TEST_ENV_VAR=HDF5_PLUGIN_PATH" | ||
| -D "TEST_ENV_VALUE=${_plugin_path}" |
There was a problem hiding this comment.
These needed to be added for Windows, matching other add_test calls above. For some reason TEST_LIBRARY_DIRECTORY does not appear to have an effect.
No description provided.