summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeInstallation.cmake7
-rw-r--r--CMakeLists.txt6
-rw-r--r--MANIFEST1
-rw-r--r--c++/examples/CMakeTests.cmake8
-rw-r--r--config/cmake/hdf5-config-version.cmake.in58
-rw-r--r--config/cmake/hdf5-config.cmake.in28
-rw-r--r--config/cmake/jrunTest.cmake8
-rw-r--r--config/cmake/userblockTest.cmake8
-rw-r--r--config/cmake_ext_mod/ConfigureChecks.cmake8
-rw-r--r--config/cmake_ext_mod/HDFUseCXX.cmake4
-rw-r--r--config/cmake_ext_mod/runTest.cmake8
-rw-r--r--examples/CMakeTests.cmake12
-rw-r--r--fortran/examples/CMakeTests.cmake12
-rw-r--r--fortran/test/CMakeTests.cmake2
-rw-r--r--hl/examples/CMakeTests.cmake4
-rw-r--r--hl/fortran/test/CMakeLists.txt4
-rw-r--r--hl/fortran/test/CMakeTests.cmake4
-rw-r--r--hl/test/CMakeTests.cmake4
-rw-r--r--hl/tools/h5watch/CMakeTests.cmake2
-rw-r--r--java/examples/datasets/CMakeLists.txt6
-rw-r--r--java/examples/datatypes/CMakeLists.txt4
-rw-r--r--java/examples/groups/CMakeLists.txt10
-rw-r--r--java/examples/intro/CMakeLists.txt4
-rw-r--r--java/src/hdf/hdf5lib/H5.java4
-rw-r--r--test/CMakeLists.txt20
-rw-r--r--test/CMakeTests.cmake40
-rw-r--r--test/CMakeVFDTests.cmake20
-rw-r--r--test/CMakeVOLTests.cmake14
-rw-r--r--test/flushrefreshTest.cmake102
-rw-r--r--testpar/CMakeLists.txt4
-rw-r--r--testpar/CMakeTests.cmake18
-rw-r--r--testpar/CMakeVFDTests.cmake22
-rw-r--r--tools/test/h5copy/CMakeTests.cmake34
-rw-r--r--tools/test/h5diff/CMakeTests.cmake16
-rw-r--r--tools/test/h5dump/CMakeTests.cmake22
-rw-r--r--tools/test/h5dump/CMakeTestsPBITS.cmake6
-rw-r--r--tools/test/h5dump/CMakeTestsVDS.cmake14
-rw-r--r--tools/test/h5dump/CMakeTestsXML.cmake6
-rw-r--r--tools/test/h5format_convert/CMakeTests.cmake76
-rw-r--r--tools/test/h5import/CMakeTests.cmake4
-rw-r--r--tools/test/h5jam/CMakeTests.cmake8
-rw-r--r--tools/test/h5ls/CMakeTests.cmake10
-rw-r--r--tools/test/h5ls/CMakeTestsVDS.cmake10
-rw-r--r--tools/test/h5repack/CMakeTests.cmake36
-rw-r--r--tools/test/h5repack/CMakeVFDTests.cmake2
-rw-r--r--tools/test/h5stat/CMakeTests.cmake14
-rw-r--r--tools/test/misc/CMakeTestsClear.cmake24
-rw-r--r--tools/test/misc/CMakeTestsMkgrp.cmake4
48 files changed, 335 insertions, 407 deletions
diff --git a/CMakeInstallation.cmake b/CMakeInstallation.cmake
index 7a0746a..6d05a58 100644
--- a/CMakeInstallation.cmake
+++ b/CMakeInstallation.cmake
@@ -104,9 +104,10 @@ endif ()
# Configure the hdf5-config-version .cmake file for the install directory
#-----------------------------------------------------------------------------
if (NOT HDF5_EXTERNALLY_CONFIGURED)
- configure_file (
- ${HDF_RESOURCES_DIR}/hdf5-config-version.cmake.in
- ${HDF5_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config-version.cmake @ONLY
+ write_basic_package_version_file (
+ ${HDF5_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config-version.cmake
+ VERSION ${HDF5_PACKAGE_VERSION}
+ COMPATIBILITY SameMinorVersion
)
install (
FILES ${HDF5_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config-version.cmake
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b9cdf4d..6446a7d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -10,7 +10,7 @@ project (HDF5 C)
# set CMAKE_INSTALL_PREFIX to the required install path.
# Make install can be used to install all components for system-wide use.
#
-if ("${CMAKE_CURRENT_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
+if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_CURRENT_BINARY_DIR)
MESSAGE(FATAL_ERROR "\nERROR! ${PROJECT_NAME} DOES NOT SUPPORT IN SOURCE BUILDS!\n"
"CMAKE_CURRENT_SOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR}"
" == CMAKE_CURRENT_BINARY_DIR=${CMAKE_CURRENT_BINARY_DIR}\n"
@@ -314,7 +314,7 @@ set (HDF5_PACKAGE_NAME "HDF5")
set (HDF5_PACKAGE_VERSION "${H5_VERS_MAJOR}.${H5_VERS_MINOR}.${H5_VERS_RELEASE}")
set (HDF5_PACKAGE_VERSION_MAJOR "${H5_VERS_MAJOR}.${H5_VERS_MINOR}")
set (HDF5_PACKAGE_VERSION_MINOR "${H5_VERS_RELEASE}")
-if (NOT "${H5_VERS_SUBRELEASE}" STREQUAL "")
+if (H5_VERS_SUBRELEASE)
set (HDF5_PACKAGE_VERSION_STRING "${HDF5_PACKAGE_VERSION}-${H5_VERS_SUBRELEASE}")
else ()
set (HDF5_PACKAGE_VERSION_STRING "${HDF5_PACKAGE_VERSION}")
@@ -845,7 +845,7 @@ if (EXISTS "${HDF5_SOURCE_DIR}/fortran" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/for
message (STATUS "Fortran compiler ID is ${CMAKE_Fortran_COMPILER_ID}")
# Building with PGI requires CMake 3.3 or greater because previous versions
# of CMake add the wrong compiler flag for the PGI Fortran compiler.
- if ("${CMAKE_Fortran_COMPILER_ID}" MATCHES "PGI" AND "${CMAKE_VERSION}" VERSION_LESS "3.3")
+ if (CMAKE_Fortran_COMPILER_ID MATCHES "PGI" AND CMAKE_VERSION VERSION_LESS "3.3")
message (FATAL_ERROR " **** PGI FORTRAN REQUIRES CMAKE VERSION 3.3 OR GREATER **** ")
endif ()
diff --git a/MANIFEST b/MANIFEST
index 6c2018a..0b2026d 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -3240,7 +3240,6 @@
./config/cmake/H5cxx_config.h.in
./config/cmake/H5pubconf.h.in
./config/cmake/hdf5-config.cmake.in
-./config/cmake/hdf5-config-version.cmake.in
./config/cmake/HDFCompilerFlags.cmake
./config/cmake/HDF5_Process_Flex_Files.cmake
./config/cmake/HDF5Macros.cmake
diff --git a/c++/examples/CMakeTests.cmake b/c++/examples/CMakeTests.cmake
index bd1f95b..58bdb68 100644
--- a/c++/examples/CMakeTests.cmake
+++ b/c++/examples/CMakeTests.cmake
@@ -26,7 +26,7 @@
SDSextendible.h5
Select.h5
)
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (CPP_ex-clear-objects PROPERTIES DEPENDS ${last_test})
endif ()
set (last_test "CPP_ex-clear-objects")
@@ -46,7 +46,7 @@
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
endif ()
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (CPP_ex_${example} PROPERTIES DEPENDS ${last_test})
endif ()
set (last_test "CPP_ex_${example}")
@@ -66,7 +66,7 @@
h5tutr_groups.h5
h5tutr_subset.h5
)
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (CPP_ex_tutr-clear-objects PROPERTIES DEPENDS ${last_test})
endif ()
set (last_test "CPP_ex_tutr-clear-objects")
@@ -86,7 +86,7 @@
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
endif ()
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (CPP_ex_${example} PROPERTIES DEPENDS ${last_test})
endif ()
set (last_test "CPP_ex_${example}")
diff --git a/config/cmake/hdf5-config-version.cmake.in b/config/cmake/hdf5-config-version.cmake.in
deleted file mode 100644
index 8e16725..0000000
--- a/config/cmake/hdf5-config-version.cmake.in
+++ /dev/null
@@ -1,58 +0,0 @@
-#
-# Copyright by The HDF Group.
-# All rights reserved.
-#
-# This file is part of HDF5. The full HDF5 copyright notice, including
-# terms governing use, modification, and redistribution, is contained in
-# the COPYING file, which can be found at the root of the source code
-# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
-# If you do not have access to either file, you may request a copy from
-# help@hdfgroup.org.
-#
-#-----------------------------------------------------------------------------
-# HDF5 Version file for install directory
-#-----------------------------------------------------------------------------
-#
-# The created file sets PACKAGE_VERSION_EXACT if the current version string and
-# the requested version string are exactly the same and it sets
-# PACKAGE_VERSION_COMPATIBLE if the current version is >= requested version,
-# but only if the requested major.minor version is the same as the current one.
-# The variable HDF5_VERSION_STRING must be set before calling configure_file().
-
-set (PACKAGE_VERSION "@HDF5_VERSION_STRING@")
-
-if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}" )
- set(PACKAGE_VERSION_COMPATIBLE FALSE)
-else ()
- if ("${PACKAGE_FIND_VERSION_MAJOR}" STREQUAL "@H5_VERS_MAJOR@")
-
- # exact match for version @H5_VERS_MAJOR@.@H5_VERS_MINOR@
- if ("${PACKAGE_FIND_VERSION_MINOR}" STREQUAL "@H5_VERS_MINOR@")
-
- # compatible with any version @H5_VERS_MAJOR@.@H5_VERS_MINOR@.x
- set (PACKAGE_VERSION_COMPATIBLE TRUE)
-
- if ("${PACKAGE_FIND_VERSION_PATCH}" STREQUAL "@H5_VERS_RELEASE@")
- set (PACKAGE_VERSION_EXACT TRUE)
-
- if ("${PACKAGE_FIND_VERSION_TWEAK}" STREQUAL "@H5_VERS_SUBRELEASE@")
- # not using this yet
- endif ()
- endif ()
- else ()
- set (PACKAGE_VERSION_COMPATIBLE FALSE)
- endif ()
- endif ()
-endif ()
-
-# if the installed or the using project don't have CMAKE_SIZEOF_VOID_P set, ignore it:
-if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "" OR "@CMAKE_SIZEOF_VOID_P@" STREQUAL "")
- return()
-endif ()
-
-# check that the installed version has the same 32/64bit-ness as the one which is currently searching:
-if(NOT "${CMAKE_SIZEOF_VOID_P}" STREQUAL "@CMAKE_SIZEOF_VOID_P@")
- math(EXPR installedBits "@CMAKE_SIZEOF_VOID_P@ * 8")
- set(PACKAGE_VERSION "${PACKAGE_VERSION} (${installedBits}bit)")
- set(PACKAGE_VERSION_UNSUITABLE TRUE)
-endif ()
diff --git a/config/cmake/hdf5-config.cmake.in b/config/cmake/hdf5-config.cmake.in
index 3bd9e1d..800de85 100644
--- a/config/cmake/hdf5-config.cmake.in
+++ b/config/cmake/hdf5-config.cmake.in
@@ -127,14 +127,14 @@ endif ()
# Handle requested components:
list (REMOVE_DUPLICATES ${HDF5_PACKAGE_NAME}_FIND_COMPONENTS)
foreach (comp IN LISTS ${HDF5_PACKAGE_NAME}_FIND_COMPONENTS)
- if (${comp} STREQUAL "shared")
+ if (comp STREQUAL "shared")
list (REMOVE_ITEM ${HDF5_PACKAGE_NAME}_FIND_COMPONENTS ${comp})
set (${HDF5_PACKAGE_NAME}_LIB_TYPE ${${HDF5_PACKAGE_NAME}_LIB_TYPE} ${comp})
if (${HDF5_PACKAGE_NAME}_BUILD_FORTRAN)
set (${HDF5_PACKAGE_NAME}_INCLUDE_DIR_FORTRAN "@PACKAGE_INCLUDE_INSTALL_DIR@/shared")
endif ()
- elseif (${comp} STREQUAL "static")
+ elseif (comp STREQUAL "static")
list (REMOVE_ITEM ${HDF5_PACKAGE_NAME}_FIND_COMPONENTS ${comp})
set (${HDF5_PACKAGE_NAME}_LIB_TYPE ${${HDF5_PACKAGE_NAME}_LIB_TYPE} ${comp})
@@ -146,32 +146,32 @@ endforeach ()
foreach (libtype IN LISTS ${HDF5_PACKAGE_NAME}_LIB_TYPE)
foreach (comp IN LISTS ${HDF5_PACKAGE_NAME}_FIND_COMPONENTS)
set (hdf5_comp2)
- if (${comp} STREQUAL "C")
+ if (comp STREQUAL "C")
set (hdf5_comp "hdf5")
- elseif (${comp} STREQUAL "CXX")
+ elseif (comp STREQUAL "CXX")
set (hdf5_comp "hdf5_cpp")
- elseif (${comp} STREQUAL "HL")
+ elseif (comp STREQUAL "HL")
set (hdf5_comp "hdf5_hl")
- elseif (${comp} STREQUAL "CXX_HL")
+ elseif (comp STREQUAL "CXX_HL")
set (hdf5_comp "hdf5_hl_cpp")
- elseif (${comp} STREQUAL "Java")
+ elseif (comp STREQUAL "Java")
set (hdf5_comp "hdf5_java")
- elseif (${comp} STREQUAL "Tools")
+ elseif (comp STREQUAL "Tools")
set (hdf5_comp "hdf5_tools")
- elseif (${comp} STREQUAL "Fortran")
+ elseif (comp STREQUAL "Fortran")
set (hdf5_comp2 "hdf5_f90cstub")
set (hdf5_comp "hdf5_fortran")
- elseif (${comp} STREQUAL "Fortran_HL")
+ elseif (comp STREQUAL "Fortran_HL")
set (hdf5_comp2 "hdf5_hl_f90cstub")
set (hdf5_comp "hdf5_hl_fortran")
endif ()
- if (${comp} STREQUAL "Java")
+ if (comp STREQUAL "Java")
list (FIND ${HDF5_PACKAGE_NAME}_EXPORT_LIBRARIES "${hdf5_comp}" HAVE_COMP)
else ()
list (FIND ${HDF5_PACKAGE_NAME}_EXPORT_LIBRARIES "${hdf5_comp}-${libtype}" HAVE_COMP)
endif ()
if (${HAVE_COMP} LESS 0)
- if (${comp} STREQUAL "Java")
+ if (comp STREQUAL "Java")
set (${HDF5_PACKAGE_NAME}_${comp}_FOUND 0)
else ()
set (${HDF5_PACKAGE_NAME}_${libtype}_${comp}_FOUND 0)
@@ -184,9 +184,9 @@ foreach (libtype IN LISTS ${HDF5_PACKAGE_NAME}_LIB_TYPE)
else ()
set (${HDF5_PACKAGE_NAME}_${libtype}_${comp}_FOUND 1)
string(TOUPPER ${HDF5_PACKAGE_NAME}_${comp}_${libtype}_LIBRARY COMP_LIBRARY)
- set (${COMP_LIBRARY} ${${COMP_LIBRARY}} @HDF5_PACKAGE@::${hdf5_comp2}-${libtype} @HDF5_PACKAGE@::${hdf5_comp}-${libtype})
+ set (${COMP_LIBRARY} ${${COMP_LIBRARY}} @HDF5_PACKAGE@::${hdf5_comp2}-${libtype} @HDF5_PACKAGE@::${hdf5_comp}-${lcomp
endif ()
- elseif (${comp} STREQUAL "Java")
+ elseif (comp STREQUAL "Java")
set (${HDF5_PACKAGE_NAME}_${comp}_FOUND 1)
string(TOUPPER ${HDF5_PACKAGE_NAME}_${comp}_LIBRARY COMP_LIBRARY)
set (${COMP_LIBRARY} ${${COMP_LIBRARY}} hdf5::${hdf5_comp})
diff --git a/config/cmake/jrunTest.cmake b/config/cmake/jrunTest.cmake
index 23f297c..d5cd903 100644
--- a/config/cmake/jrunTest.cmake
+++ b/config/cmake/jrunTest.cmake
@@ -142,8 +142,8 @@ if (NOT TEST_SKIP_COMPARE)
foreach (line RANGE 0 ${_FP_LEN})
list (GET test_act ${line} str_act)
list (GET test_ref ${line} str_ref)
- if (NOT ${str_act} STREQUAL ${str_ref})
- if (NOT str_act STREQUAL "")
+ if (NOT str_act STREQUAL str_ref)
+ if (str_act)
set (TEST_RESULT 1)
message ("line = ${line}\n***ACTUAL: ${str_act}\n****REFER: ${str_ref}\n")
endif ()
@@ -194,8 +194,8 @@ if (NOT TEST_SKIP_COMPARE)
foreach (line RANGE 0 ${_FP_LEN})
list (GET test_act ${line} str_act)
list (GET test_ref ${line} str_ref)
- if (NOT ${str_act} STREQUAL ${str_ref})
- if (NOT ${str_act} STREQUAL "")
+ if (NOT str_act STREQUAL str_ref)
+ if (str_act)
set (TEST_RESULT 1)
message ("line = ${line}\n***ACTUAL: ${str_act}\n****REFER: ${str_ref}\n")
endif ()
diff --git a/config/cmake/userblockTest.cmake b/config/cmake/userblockTest.cmake
index 9af7e5b..4a580d0 100644
--- a/config/cmake/userblockTest.cmake
+++ b/config/cmake/userblockTest.cmake
@@ -62,7 +62,7 @@ if (TEST_CHECKUB STREQUAL "YES")
OUTPUT_VARIABLE TEST_OUT
ERROR_VARIABLE TEST_ERROR
)
- if (NOT ${TEST_RESULT} STREQUAL "0")
+ if (TEST_RESULT)
message (FATAL_ERROR "Failed: The output of ${TEST_PROGRAM} ${TEST_OFILE} is: ${TEST_ERROR}")
endif ()
file (READ ${TEST_HFILE}.len.txt TEST_O_STRING_LEN)
@@ -70,7 +70,7 @@ if (TEST_CHECKUB STREQUAL "YES")
math( EXPR TEST_STRING_SIZE "${TEST_U_STRING_LEN} + ${TEST_O_STRING_LEN}" )
- if (NOT TEST_O_STRING_LEN STREQUAL "0")
+ if (TEST_O_STRING_LEN)
#$JAM_BIN/getub -c $s2 $origfile > $cmpfile
EXECUTE_PROCESS (
COMMAND ${TEST_GET_PROGRAM} -c ${TEST_O_STRING_LEN} ${TEST_OFILE}
@@ -108,7 +108,7 @@ if (TEST_CHECKUB STREQUAL "YES")
message (STATUS "COMPARE Result: ${TEST_RESULT}: ${TEST_STRING_SIZE}=${TEST_U_STRING_LEN}+${TEST_O_STRING_LEN}")
# if the return value is !=${TEST_EXPECT} bail out
- if (NOT ${TEST_RESULT} STREQUAL ${TEST_EXPECT})
+ if (NOT TEST_RESULT EQUAL TEST_EXPECT)
message (FATAL_ERROR "Failed: The output of ${TEST_HFILE}-ub did not match ${TEST_HFILE}.\n${TEST_ERROR}")
endif ()
else ()
@@ -121,7 +121,7 @@ else ()
OUTPUT_VARIABLE TEST_OUT
ERROR_VARIABLE TEST_ERROR
)
- if (NOT TEST_H_STRING_LEN STREQUAL "0")
+ if (TEST_H_STRING_LEN)
message (FATAL_ERROR "Failed: The output of ${TEST_HFILE} was NOT empty")
endif ()
endif ()
diff --git a/config/cmake_ext_mod/ConfigureChecks.cmake b/config/cmake_ext_mod/ConfigureChecks.cmake
index 986280f..60dda17 100644
--- a/config/cmake_ext_mod/ConfigureChecks.cmake
+++ b/config/cmake_ext_mod/ConfigureChecks.cmake
@@ -445,7 +445,7 @@ if (NOT WINDOWS)
# Check a bunch of time functions
#-----------------------------------------------------------------------------
CHECK_FUNCTION_EXISTS (gettimeofday ${HDF_PREFIX}_HAVE_GETTIMEOFDAY)
- foreach (test
+ foreach (time_test
HAVE_TM_GMTOFF
HAVE___TM_GMTOFF
# HAVE_TIMEZONE
@@ -455,7 +455,7 @@ if (NOT WINDOWS)
HAVE_TM_ZONE
HAVE_STRUCT_TM_TM_ZONE
)
- HDF_FUNCTION_TEST (${test})
+ HDF_FUNCTION_TEST (${time_test})
endforeach ()
if (NOT CYGWIN AND NOT MINGW)
HDF_FUNCTION_TEST (HAVE_TIMEZONE)
@@ -559,7 +559,7 @@ endif ()
# Check a bunch of other functions
#-----------------------------------------------------------------------------
if (NOT WINDOWS)
- foreach (test
+ foreach (other_test
HAVE_ATTRIBUTE
HAVE_C99_FUNC
# STDC_HEADERS
@@ -568,7 +568,7 @@ if (NOT WINDOWS)
SYSTEM_SCOPE_THREADS
HAVE_SOCKLEN_T
)
- HDF_FUNCTION_TEST (${test})
+ HDF_FUNCTION_TEST (${other_test})
endforeach ()
endif ()
diff --git a/config/cmake_ext_mod/HDFUseCXX.cmake b/config/cmake_ext_mod/HDFUseCXX.cmake
index efaa556..8d98147 100644
--- a/config/cmake_ext_mod/HDFUseCXX.cmake
+++ b/config/cmake_ext_mod/HDFUseCXX.cmake
@@ -96,7 +96,7 @@ endmacro ()
# Check a bunch of cxx functions
#-----------------------------------------------------------------------------
if (CMAKE_CXX_COMPILER_LOADED)
- foreach (test
+ foreach (cxx_test
OLD_HEADER_FILENAME
HDF_NO_NAMESPACE
HDF_NO_STD
@@ -104,6 +104,6 @@ if (CMAKE_CXX_COMPILER_LOADED)
NO_STATIC_CAST
CXX_HAVE_OFFSETOF
)
- HDF_CXX_FUNCTION_TEST (${test})
+ HDF_CXX_FUNCTION_TEST (${cxx_test})
endforeach ()
endif ()
diff --git a/config/cmake_ext_mod/runTest.cmake b/config/cmake_ext_mod/runTest.cmake
index 48402a2..13e8a4d 100644
--- a/config/cmake_ext_mod/runTest.cmake
+++ b/config/cmake_ext_mod/runTest.cmake
@@ -218,8 +218,8 @@ if (NOT TEST_SKIP_COMPARE)
foreach (line RANGE 0 ${_FP_LEN})
list (GET test_act ${line} str_act)
list (GET test_ref ${line} str_ref)
- if (NOT ${str_act} STREQUAL ${str_ref})
- if (NOT str_act STREQUAL "")
+ if (NOT str_act STREQUAL str_ref)
+ if (str_act)
set (TEST_RESULT 1)
message ("line = ${line}\n***ACTUAL: ${str_act}\n****REFER: ${str_ref}\n")
endif ()
@@ -270,8 +270,8 @@ if (NOT TEST_SKIP_COMPARE)
foreach (line RANGE 0 ${_FP_LEN})
list (GET test_act ${line} str_act)
list (GET test_ref ${line} str_ref)
- if (NOT ${str_act} STREQUAL ${str_ref})
- if (NOT ${str_act} STREQUAL "")
+ if (NOT str_act STREQUAL str_ref)
+ if (str_act)
set (TEST_RESULT 1)
message ("line = ${line}\n***ACTUAL: ${str_act}\n****REFER: ${str_ref}\n")
endif ()
diff --git a/examples/CMakeTests.cmake b/examples/CMakeTests.cmake
index cb47c78..1058566 100644
--- a/examples/CMakeTests.cmake
+++ b/examples/CMakeTests.cmake
@@ -71,7 +71,7 @@
vds-simpleIO.h5
vds-eiger.h5
)
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (EXAMPLES-clear-objects PROPERTIES DEPENDS ${last_test})
endif ()
set (last_test "EXAMPLES-clear-objects")
@@ -91,7 +91,7 @@
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
endif ()
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (EXAMPLES-${example} PROPERTIES DEPENDS ${last_test})
endif ()
set (last_test "EXAMPLES-${example}")
@@ -150,7 +150,7 @@
WORKING_DIRECTORY
${PROJECT_BINARY_DIR}/H5EX-shared
)
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (EXAMPLES-shared-clear-objects PROPERTIES DEPENDS ${last_test})
endif ()
set (last_test "EXAMPLES-shared-clear-objects")
@@ -171,7 +171,7 @@
)
endif ()
set_tests_properties (EXAMPLES-shared-${example} PROPERTIES WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/H5EX-shared)
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (EXAMPLES-shared-${example} PROPERTIES DEPENDS ${last_test})
endif ()
set (last_test "EXAMPLES-shared-${example}")
@@ -194,7 +194,7 @@
-P "${HDF_RESOURCES_EXT_DIR}/grepTest.cmake"
)
endif ()
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (MPI_TEST_EXAMPLES-ph5example PROPERTIES DEPENDS ${last_test})
endif ()
set (last_test "MPI_TEST_EXAMPLES-ph5example")
@@ -214,7 +214,7 @@
)
endif ()
set_tests_properties (MPI_TEST_EXAMPLES-shared-ph5example PROPERTIES WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/H5EX-shared)
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (MPI_TEST_EXAMPLES-shared-ph5example PROPERTIES DEPENDS ${last_test})
endif ()
set (last_test "MPI_TEST_EXAMPLES-shared-ph5example")
diff --git a/fortran/examples/CMakeTests.cmake b/fortran/examples/CMakeTests.cmake
index face086..efbb209 100644
--- a/fortran/examples/CMakeTests.cmake
+++ b/fortran/examples/CMakeTests.cmake
@@ -37,7 +37,7 @@
SDScompound.h5
test.h5
)
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (f90_ex-clear-objects PROPERTIES DEPENDS ${last_test})
endif ()
set (last_test "f90_ex-clear-objects")
@@ -62,7 +62,7 @@
SDScompound.h5
test.h5
)
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (f90_ex-shared-clear-objects PROPERTIES DEPENDS ${last_test})
endif ()
set (last_test "f90_ex-shared-clear-objects")
@@ -83,7 +83,7 @@ foreach (example ${examples})
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
endif ()
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (f90_ex_${example} PROPERTIES DEPENDS ${last_test})
endif ()
set (last_test "f90_ex_${example}")
@@ -102,7 +102,7 @@ foreach (example ${examples})
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
endif ()
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (f90_ex-shared_${example} PROPERTIES DEPENDS ${last_test})
endif ()
set (last_test "f90_ex-shared_${example}")
@@ -124,7 +124,7 @@ foreach (example ${F2003_examples})
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
endif ()
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (f03_ex_${example} PROPERTIES DEPENDS ${last_test})
endif ()
set (last_test "f03_ex_${example}")
@@ -143,7 +143,7 @@ foreach (example ${F2003_examples})
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
endif ()
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (f03_ex-shared_${example} PROPERTIES DEPENDS ${last_test})
endif ()
set (last_test "f03_ex-shared_${example}")
diff --git a/fortran/test/CMakeTests.cmake b/fortran/test/CMakeTests.cmake
index 2824ef7..5fa10f4 100644
--- a/fortran/test/CMakeTests.cmake
+++ b/fortran/test/CMakeTests.cmake
@@ -58,7 +58,7 @@ add_test (
vds.h5
visit.h5
)
-if (NOT "${last_test}" STREQUAL "")
+if (last_test)
set_tests_properties (FORTRAN_testhdf5-clear-objects PROPERTIES DEPENDS ${last_test})
endif ()
set (last_test "FORTRAN_testhdf5-clear-objects")
diff --git a/hl/examples/CMakeTests.cmake b/hl/examples/CMakeTests.cmake
index 166fa7c..c1fd6c2 100644
--- a/hl/examples/CMakeTests.cmake
+++ b/hl/examples/CMakeTests.cmake
@@ -51,7 +51,7 @@ add_custom_target(hl_ex_ex_ds1_files ALL COMMENT "Copying files needed by hl_ex_
ex_table_12.h5
ex_ds1.h5
)
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (HL_ex-clear-objects PROPERTIES DEPENDS ${last_test})
endif ()
set (last_test "HL_ex-clear-objects")
@@ -71,7 +71,7 @@ foreach (example ${examples})
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
endif ()
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (HL_ex_${example} PROPERTIES DEPENDS ${last_test})
endif ()
set (last_test "HL_ex_${example}")
diff --git a/hl/fortran/test/CMakeLists.txt b/hl/fortran/test/CMakeLists.txt
index 923989d..fca2852 100644
--- a/hl/fortran/test/CMakeLists.txt
+++ b/hl/fortran/test/CMakeLists.txt
@@ -70,8 +70,8 @@ macro (ADD_H5_FORTRAN_EXE file)
endif ()
endmacro ()
-foreach (test ${H5_TESTS})
- ADD_H5_FORTRAN_EXE(${test})
+foreach (h5_test ${H5_TESTS})
+ ADD_H5_FORTRAN_EXE(${h5_test})
endforeach ()
include (CMakeTests.cmake)
diff --git a/hl/fortran/test/CMakeTests.cmake b/hl/fortran/test/CMakeTests.cmake
index 04a49dc..54cc6ef 100644
--- a/hl/fortran/test/CMakeTests.cmake
+++ b/hl/fortran/test/CMakeTests.cmake
@@ -87,6 +87,6 @@ if (BUILD_SHARED_LIBS)
)
endif ()
-foreach (test ${H5_TESTS})
- ADD_H5_FORTRAN_TEST(${test})
+foreach (h5_test ${H5_TESTS})
+ ADD_H5_FORTRAN_TEST(${h5_test})
endforeach ()
diff --git a/hl/test/CMakeTests.cmake b/hl/test/CMakeTests.cmake
index 4e945bc..477a165 100644
--- a/hl/test/CMakeTests.cmake
+++ b/hl/test/CMakeTests.cmake
@@ -61,7 +61,7 @@ macro (HL_ADD_TEST hl_name)
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
endif ()
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (HL_${hl_name} PROPERTIES DEPENDS ${last_test}
ENVIRONMENT "srcdir=${HDF5_HL_TEST_BINARY_DIR}"
WORKING_DIRECTORY ${HDF5_HL_TEST_BINARY_DIR}
@@ -104,7 +104,7 @@ add_test (
testfl_packet_table_vlen.h5
test_table.h5
)
-if (NOT "${last_test}" STREQUAL "")
+if (last_test)
set_tests_properties (HL_test-clear-objects PROPERTIES DEPENDS ${last_test})
endif ()
set (last_test "HL_test-clear-objects")
diff --git a/hl/tools/h5watch/CMakeTests.cmake b/hl/tools/h5watch/CMakeTests.cmake
index 13d5e47..a4d3fa2 100644
--- a/hl/tools/h5watch/CMakeTests.cmake
+++ b/hl/tools/h5watch/CMakeTests.cmake
@@ -147,7 +147,7 @@ if (NOT SWMR_INCOMPAT)
-E remove
WATCH.h5
)
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (H5WATCH-clearall-objects PROPERTIES DEPENDS ${last_test})
endif ()
set (last_test "H5WATCH-clearall-objects")
diff --git a/java/examples/datasets/CMakeLists.txt b/java/examples/datasets/CMakeLists.txt
index 1375372..2338d0f 100644
--- a/java/examples/datasets/CMakeLists.txt
+++ b/java/examples/datasets/CMakeLists.txt
@@ -87,7 +87,7 @@ MACRO (ADD_H5_TEST resultfile resultcode)
-D "TEST_REFERENCE=datasets/${resultfile}.txt"
-P "${HDF_RESOURCES_DIR}/jrunTest.cmake"
)
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (JAVA_datasets-${resultfile} PROPERTIES DEPENDS ${last_test})
endif ()
set (last_test "JAVA_datasets-${resultfile}")
@@ -96,7 +96,7 @@ ENDMACRO ()
if (BUILD_TESTING)
foreach (example ${HDF_JAVA_EXAMPLES})
- if ("${example}" STREQUAL "H5Ex_D_External")
+ if (example STREQUAL "H5Ex_D_External")
add_test (
NAME JAVA_datasets-${example}-clear-objects
COMMAND ${CMAKE_COMMAND}
@@ -112,7 +112,7 @@ if (BUILD_TESTING)
${HDFJAVA_EXAMPLES_BINARY_DIR}/${example}.h5
)
endif ()
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (JAVA_datasets-${example}-clear-objects PROPERTIES DEPENDS ${last_test})
endif ()
add_test (
diff --git a/java/examples/datatypes/CMakeLists.txt b/java/examples/datatypes/CMakeLists.txt
index 4a8b2a4..0fef370 100644
--- a/java/examples/datatypes/CMakeLists.txt
+++ b/java/examples/datatypes/CMakeLists.txt
@@ -72,7 +72,7 @@ MACRO (ADD_H5_TEST resultfile resultcode)
-D "TEST_REFERENCE=datatypes/${resultfile}.txt"
-P "${HDF_RESOURCES_DIR}/jrunTest.cmake"
)
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (JAVA_datatypes-${resultfile} PROPERTIES DEPENDS ${last_test})
endif ()
set (last_test "JAVA_datatypes-${resultfile}")
@@ -86,7 +86,7 @@ if (BUILD_TESTING)
-E remove
${HDFJAVA_EXAMPLES_BINARY_DIR}/${example}.h5
)
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (JAVA_datatypes-${example}-clear-objects PROPERTIES DEPENDS ${last_test})
endif ()
add_test (
diff --git a/java/examples/groups/CMakeLists.txt b/java/examples/groups/CMakeLists.txt
index 2c5d33b..631eba7 100644
--- a/java/examples/groups/CMakeLists.txt
+++ b/java/examples/groups/CMakeLists.txt
@@ -71,7 +71,7 @@ MACRO (ADD_H5_TEST resultfile resultcode)
-D "TEST_REFERENCE=groups/${resultfile}.txt"
-P "${HDF_RESOURCES_DIR}/jrunTest.cmake"
)
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (JAVA_groups-${resultfile} PROPERTIES DEPENDS ${last_test})
endif ()
set (last_test "JAVA_groups-${resultfile}")
@@ -79,8 +79,8 @@ ENDMACRO ()
if (BUILD_TESTING)
foreach (example ${HDF_JAVA_EXAMPLES})
- if (NOT "${example}" STREQUAL "H5Ex_G_Iterate" AND NOT "${example}" STREQUAL "H5Ex_G_Visit")
- if ("${example}" STREQUAL "H5Ex_G_Compact")
+ if (NOT example STREQUAL "H5Ex_G_Iterate" AND NOT example STREQUAL "H5Ex_G_Visit")
+ if (example STREQUAL "H5Ex_G_Compact")
add_test (
NAME JAVA_groups-${example}-clear-h5s
COMMAND ${CMAKE_COMMAND}
@@ -96,7 +96,7 @@ if (BUILD_TESTING)
${HDFJAVA_EXAMPLES_BINARY_DIR}/${example}.h5
)
endif ()
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (JAVA_groups-${example}-clear-h5s PROPERTIES DEPENDS ${last_test})
endif ()
set (last_test "JAVA_groups-${example}-clear-h5s")
@@ -108,7 +108,7 @@ if (BUILD_TESTING)
${HDFJAVA_EXAMPLES_SOURCE_DIR}/testfiles/examples.groups.${example}.txt
${HDFJAVA_EXAMPLES_GROUPS_BINARY_DIR}/${example}.txt
)
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (JAVA_groups-${example}-copy-objects PROPERTIES DEPENDS ${last_test})
endif ()
set (last_test "JAVA_groups-${example}-copy-objects")
diff --git a/java/examples/intro/CMakeLists.txt b/java/examples/intro/CMakeLists.txt
index 8d56b86..8c94a09 100644
--- a/java/examples/intro/CMakeLists.txt
+++ b/java/examples/intro/CMakeLists.txt
@@ -73,7 +73,7 @@ MACRO (ADD_H5_TEST resultfile resultcode)
-D "TEST_REFERENCE=intro/${resultfile}.txt"
-P "${HDF_RESOURCES_DIR}/jrunTest.cmake"
)
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (JAVA_intro-${resultfile} PROPERTIES DEPENDS ${last_test})
endif ()
set (last_test "JAVA_intro-${resultfile}")
@@ -88,7 +88,7 @@ if (BUILD_TESTING)
-E remove
${HDFJAVA_EXAMPLES_BINARY_DIR}/${example}.h5
)
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (JAVA_intro-${example}-clear-objects PROPERTIES DEPENDS ${last_test})
endif ()
add_test (
diff --git a/java/src/hdf/hdf5lib/H5.java b/java/src/hdf/hdf5lib/H5.java
index 19ca83b..57157c2 100644
--- a/java/src/hdf/hdf5lib/H5.java
+++ b/java/src/hdf/hdf5lib/H5.java
@@ -3233,6 +3233,8 @@ public class H5 implements java.io.Serializable {
* @param file_id
* IN: Identifier of the target file.
*
+ * @return true if the file-level is set to create minimized dataset object headers, false if not.
+ *
* @exception HDF5LibraryException
* - Error from the HDF-5 Library.
**/
@@ -6998,6 +7000,8 @@ public class H5 implements java.io.Serializable {
* @param dcpl_id
* IN: Dataset creation property list
*
+ * @return true if the given dcpl is set to create minimized dataset object headers, false if not.
+ *
* @exception HDF5LibraryException
* - Error from the HDF-5 Library.
**/
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 0d67485..c442e9b 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -293,9 +293,9 @@ set (H5_TESTS_MULTIPLE
ttsafe
)
# Only build single source tests here
-foreach (test ${H5_TESTS})
- if (NOT ${test} IN_LIST H5_TESTS_MULTIPLE)
- ADD_H5_EXE(${test})
+foreach (h5_test ${H5_TESTS})
+ if (NOT h5_test IN_LIST H5_TESTS_MULTIPLE)
+ ADD_H5_EXE(${h5_test})
endif ()
endforeach ()
@@ -378,15 +378,15 @@ set (H5_CHECK_TESTS
flushrefresh
)
-foreach (test ${H5_CHECK_TESTS})
- ADD_H5_EXE(${test})
+foreach (h5_test ${H5_CHECK_TESTS})
+ ADD_H5_EXE(${h5_test})
endforeach ()
#-- Adding test for libinfo
set (GREP_RUNNER ${PROJECT_BINARY_DIR}/GrepRunner.cmake)
file (WRITE ${GREP_RUNNER}
"file (STRINGS \${TEST_PROGRAM} TEST_RESULT REGEX \"SUMMARY OF THE HDF5 CONFIGURATION\")
-if (\${TEST_RESULT} STREQUAL \"0\")
+if (NOT TEST_RESULT)
message (FATAL_ERROR \"Failed: The output: \${TEST_RESULT} of \${TEST_PROGRAM} did not contain SUMMARY OF THE HDF5 CONFIGURATION\")
else ()
message (STATUS \"COMMAND Result: \${TEST_RESULT}\")
@@ -411,8 +411,8 @@ set (H5_SWMR_TESTS
swmr_writer
)
-foreach (test ${H5_SWMR_TESTS})
- ADD_H5_EXE(${test})
+foreach (h5_test ${H5_SWMR_TESTS})
+ ADD_H5_EXE(${h5_test})
endforeach ()
set (H5_VDS_SWMR_TESTS
@@ -421,8 +421,8 @@ set (H5_VDS_SWMR_TESTS
vds_swmr_writer
)
-foreach (test ${H5_VDS_SWMR_TESTS})
- ADD_H5_EXE(${test})
+foreach (h5_test ${H5_VDS_SWMR_TESTS})
+ ADD_H5_EXE(${h5_test})
endforeach ()
#-- Adding test for accum_swmr_reader
diff --git a/test/CMakeTests.cmake b/test/CMakeTests.cmake
index 959e537..26e5a78 100644
--- a/test/CMakeTests.cmake
+++ b/test/CMakeTests.cmake
@@ -545,33 +545,33 @@ set (H5TEST_SEPARATE_TESTS
flush1
flush2
)
-foreach (test ${H5_TESTS})
- if (NOT ${test} IN_LIST H5TEST_SEPARATE_TESTS)
+foreach (h5_test ${H5_TESTS})
+ if (NOT h5_test IN_LIST H5TEST_SEPARATE_TESTS)
if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME H5TEST-${test} COMMAND $<TARGET_FILE:${test}>)
- set_tests_properties (H5TEST-${test} PROPERTIES
+ add_test (NAME H5TEST-${h5_test} COMMAND $<TARGET_FILE:${h5_test}>)
+ set_tests_properties (H5TEST-${h5_test} PROPERTIES
FIXTURES_REQUIRED clear_objects
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
)
else ()
- if ("${test}" STREQUAL "big" AND CYGWIN)
- add_test (NAME H5TEST-${test}
+ if (h5_test STREQUAL "big" AND CYGWIN)
+ add_test (NAME H5TEST-${h5_test}
COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${test}"
)
else ()
- add_test (NAME H5TEST-${test} COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:${test}>"
+ add_test (NAME H5TEST-${h5_test} COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:${h5_test}>"
-D "TEST_ARGS:STRING="
-D "TEST_EXPECT=0"
-D "TEST_SKIP_COMPARE=TRUE"
- -D "TEST_OUTPUT=${test}.txt"
+ -D "TEST_OUTPUT=${h5_test}.txt"
#-D "TEST_REFERENCE=${test}.out"
-D "TEST_FOLDER=${HDF5_TEST_BINARY_DIR}/H5TEST"
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
endif ()
- set_tests_properties (H5TEST-${test} PROPERTIES
+ set_tests_properties (H5TEST-${h5_test} PROPERTIES
FIXTURES_REQUIRED clear_objects
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
@@ -596,25 +596,25 @@ if (BUILD_SHARED_LIBS)
)
set_tests_properties (H5TEST-shared-clear-objects PROPERTIES FIXTURES_SETUP shared_clear_objects)
- foreach (test ${H5_TESTS})
- if (NOT ${test} IN_LIST H5TEST_SEPARATE_TESTS)
- if ("${test}" STREQUAL "big" AND CYGWIN)
- add_test (NAME H5TEST-shared-${test}
+ foreach (h5_test ${H5_TESTS})
+ if (NOT h5_test IN_LIST H5TEST_SEPARATE_TESTS)
+ if (h5_test STREQUAL "big" AND CYGWIN)
+ add_test (NAME H5TEST-shared-${h5_test}
COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${test}-shared"
)
else ()
- add_test (NAME H5TEST-shared-${test} COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:${test}-shared>"
+ add_test (NAME H5TEST-shared-${h5_test} COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:${h5_test}-shared>"
-D "TEST_ARGS:STRING="
-D "TEST_EXPECT=0"
-D "TEST_SKIP_COMPARE=TRUE"
- -D "TEST_OUTPUT=${test}.txt"
+ -D "TEST_OUTPUT=${h5_test}.txt"
#-D "TEST_REFERENCE=${test}.out"
-D "TEST_FOLDER=${HDF5_TEST_BINARY_DIR}/H5TEST-shared"
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
endif ()
- set_tests_properties (H5TEST-shared-${test} PROPERTIES
+ set_tests_properties (H5TEST-shared-${h5_test} PROPERTIES
FIXTURES_REQUIRED shared_clear_objects
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared
@@ -1193,8 +1193,8 @@ if (HDF5_BUILD_GENERATORS)
gen_plist
)
- foreach (gen ${H5_GENERATORS})
- ADD_H5_GENERATOR (${gen})
+ foreach (h5_gen ${H5_GENERATORS})
+ ADD_H5_GENERATOR (${h5_gen})
endforeach ()
endif ()
diff --git a/test/CMakeVFDTests.cmake b/test/CMakeVFDTests.cmake
index 569f215..ad3d1e9 100644
--- a/test/CMakeVFDTests.cmake
+++ b/test/CMakeVFDTests.cmake
@@ -109,9 +109,9 @@ endif ()
# Windows only macro
macro (CHECK_VFD_TEST vfdtest vfdname resultcode)
- if ("${vfdtest}" STREQUAL "flush1" OR "${vfdtest}" STREQUAL "flush2")
- if ("${vfdname}" STREQUAL "multi" OR "${vfdname}" STREQUAL "split")
- if (NOT BUILD_SHARED_LIBS AND NOT ${HDF_CFG_NAME} MATCHES "Debug")
+ if (vfdtest STREQUAL "flush1" OR vfdtest STREQUAL "flush2")
+ if (vfdname STREQUAL "multi" OR vfdname STREQUAL "split")
+ if (NOT BUILD_SHARED_LIBS AND NOT HDF_CFG_NAME MATCHES "Debug")
add_test (
NAME VFD-${vfdname}-${vfdtest}-clear-objects
COMMAND ${CMAKE_COMMAND}
@@ -239,7 +239,7 @@ endif ()
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname};HDF5TestExpress=${HDF_TEST_EXPRESS}"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}
)
- if (BUILD_SHARED_LIBS AND NOT "${vfdtest}" STREQUAL "cache")
+ if (BUILD_SHARED_LIBS AND NOT vfdtest STREQUAL "cache")
add_test (
NAME VFD-${vfdname}-${vfdtest}-shared-clear-objects
COMMAND ${CMAKE_COMMAND}
@@ -316,12 +316,12 @@ endif ()
endmacro ()
macro (ADD_VFD_TEST vfdname resultcode)
- foreach (test ${H5_TESTS})
- if (NOT ${test} IN_LIST H5_VFD_SKIP_TESTS)
+ foreach (h5_test ${H5_TESTS})
+ if (NOT h5_test IN_LIST H5_VFD_SKIP_TESTS)
if (WIN32)
- CHECK_VFD_TEST (${test} ${vfdname} ${resultcode})
+ CHECK_VFD_TEST (${h5_test} ${vfdname} ${resultcode})
else ()
- DO_VFD_TEST (${test} ${vfdname} ${resultcode})
+ DO_VFD_TEST (${h5_test} ${vfdname} ${resultcode})
endif ()
endif ()
endforeach ()
@@ -394,6 +394,6 @@ endif ()
endmacro ()
# Run test with different Virtual File Driver
- foreach (vfd ${VFD_LIST})
- ADD_VFD_TEST (${vfd} 0)
+ foreach (h5_vfd ${VFD_LIST})
+ ADD_VFD_TEST (${h5_vfd} 0)
endforeach ()
diff --git a/test/CMakeVOLTests.cmake b/test/CMakeVOLTests.cmake
index 334520c..7c02e23 100644
--- a/test/CMakeVOLTests.cmake
+++ b/test/CMakeVOLTests.cmake
@@ -106,8 +106,8 @@ endif ()
# Windows only macro
macro (CHECK_VOL_TEST voltest volname volinfo resultcode)
- if ("${voltest}" STREQUAL "flush1" OR "${voltest}" STREQUAL "flush2")
- if ("${volname}" STREQUAL "multi" OR "${volname}" STREQUAL "split")
+ if (voltest STREQUAL "flush1" OR voltest STREQUAL "flush2")
+ if (volname STREQUAL "multi" OR volname STREQUAL "split")
if (NOT BUILD_SHARED_LIBS AND NOT ${HDF_CFG_NAME} MATCHES "Debug")
add_test (
NAME VOL-${volname}-${voltest}-clear-objects
@@ -236,7 +236,7 @@ endif ()
ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${volname};HDF5TestExpress=${HDF_TEST_EXPRESS}"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${volname}
)
- if (BUILD_SHARED_LIBS AND NOT "${voltest}" STREQUAL "cache")
+ if (BUILD_SHARED_LIBS AND NOT voltest STREQUAL "cache")
add_test (
NAME VOL-${volname}-${voltest}-shared-clear-objects
COMMAND ${CMAKE_COMMAND}
@@ -315,12 +315,12 @@ endif ()
macro (ADD_VOL_TEST volname volinfo resultcode)
#message(STATUS "volname=${volname} volinfo=${volinfo}")
- foreach (test ${H5_TESTS})
- if (NOT ${test} IN_LIST H5_VOL_SKIP_TESTS)
+ foreach (h5_test ${H5_TESTS})
+ if (NOT h5_test IN_LIST H5_VOL_SKIP_TESTS)
if (WIN32)
- CHECK_VOL_TEST (${test} ${volname} "${volinfo}" ${resultcode})
+ CHECK_VOL_TEST (${h5_test} ${volname} "${volinfo}" ${resultcode})
else ()
- DO_VOL_TEST (${test} ${volname} "${volinfo}" ${resultcode})
+ DO_VOL_TEST (${h5_test} ${volname} "${volinfo}" ${resultcode})
endif ()
endif ()
endforeach ()
diff --git a/test/flushrefreshTest.cmake b/test/flushrefreshTest.cmake
index f66ee64..aa18c8a 100644
--- a/test/flushrefreshTest.cmake
+++ b/test/flushrefreshTest.cmake
@@ -53,7 +53,7 @@ if (TEST_ENV_VAR)
#message (STATUS "ENV:${TEST_ENV_VAR}=$ENV{${TEST_ENV_VAR}}")
endif ()
-message(STATUS "Background: ${PERL_EXECUTABLE} ${PERL_SCRIPT} ${TEST_PROGRAM}")
+message (STATUS "Background: ${PERL_EXECUTABLE} ${PERL_SCRIPT} ${TEST_PROGRAM}")
execute_process (
COMMAND ${PERL_EXECUTABLE} ${PERL_SCRIPT} ${TEST_PROGRAM}
RESULT_VARIABLE SCRIPT_RESULT
@@ -61,34 +61,34 @@ execute_process (
OUTPUT_VARIABLE SCRIPT_OUTPUT
WORKING_DIRECTORY ${TEST_FOLDER}
)
-message(STATUS "Background: ${SCRIPT_OUTPUT}")
-if (NOT "${SCRIPT_RESULT}" STREQUAL "0")
+message (STATUS "Background: ${SCRIPT_OUTPUT}")
+if (SCRIPT_RESULT)
message (FATAL_ERROR "Failed: The background script failed ${SCRIPT_RESULT}: ${SCRIPT_ERR}")
endif ()
-set(verification_done "0")
-while(verification_done LESS "1")
- message(STATUS "checking first stage:${TEST_FOLDER}/${TEST_ARGS1}")
- if(EXISTS ${TEST_FOLDER}/${TEST_ERR})
+set (verification_done "0")
+while (verification_done LESS "1")
+ message (STATUS "checking first stage:${TEST_FOLDER}/${TEST_ARGS1}")
+ if (EXISTS ${TEST_FOLDER}/${TEST_ERR})
# Error exit script
- set(verification_done "3")
- elseif(EXISTS ${TEST_FOLDER}/${TEST_ARGS1})
+ set (verification_done "3")
+ elseif (EXISTS ${TEST_FOLDER}/${TEST_ARGS1})
file (STRINGS ${TEST_FOLDER}/${TEST_ARGS1} v1)
list (LENGTH v1 len_v1)
- message(STATUS "v1:${v1} len_v1:${len_v1}")
- if (NOT "${len_v1}" STREQUAL "0")
+ message (STATUS "v1:${v1} len_v1:${len_v1}")
+ if (len_v1)
list (GET v1 0 param1)
list (GET v1 -1 param2)
endif ()
- file(REMOVE ${TEST_FOLDER}/${TEST_ARGS1})
- message(STATUS "PARAM1:${param1} PARAM2:${param2}")
+ file (REMOVE ${TEST_FOLDER}/${TEST_ARGS1})
+ message (STATUS "PARAM1:${param1} PARAM2:${param2}")
- if(${param1} MATCHES "VERIFICATION_DONE")
- set(verification_done "1")
- file(WRITE ${TEST_FOLDER}/${TEST_ARGS2} "all flush verification complete")
- message(STATUS "write: ${TEST_FOLDER}/${TEST_ARGS2}")
- else()
- message(STATUS "execute: ${TEST_PROGRAM} ${param1} ${param2}")
+ if (param1 MATCHES "VERIFICATION_DONE")
+ set (verification_done "1")
+ file (WRITE ${TEST_FOLDER}/${TEST_ARGS2} "all flush verification complete")
+ message (STATUS "write: ${TEST_FOLDER}/${TEST_ARGS2}")
+ else ()
+ message (STATUS "execute: ${TEST_PROGRAM} ${param1} ${param2}")
execute_process (
COMMAND ${TEST_PROGRAM} ${param1} ${param2}
RESULT_VARIABLE TEST_RESULT
@@ -98,40 +98,40 @@ while(verification_done LESS "1")
ERROR_VARIABLE TEST_ERROR
WORKING_DIRECTORY ${TEST_FOLDER}
)
- message(STATUS "flush verification: ${TEST_OUT}")
- if (NOT "${TEST_RESULT}" STREQUAL "0")
+ message (STATUS "flush verification: ${TEST_OUT}")
+ if (TEST_RESULT)
message (FATAL_ERROR "Failed: The flush verification failed ${TEST_RESULT}: ${TEST_ERROR}")
endif ()
- file(WRITE ${TEST_FOLDER}/${TEST_ARGS2} "verification flush process done")
- endif()
- else()
- message(STATUS "waiting: ${TEST_FOLDER}/${TEST_ARGS1}")
+ file (WRITE ${TEST_FOLDER}/${TEST_ARGS2} "verification flush process done")
+ endif ()
+ else ()
+ message (STATUS "waiting: ${TEST_FOLDER}/${TEST_ARGS1}")
#execute_process (COMMAND ${CMAKE_COMMAND} -E sleep 2)
- endif()
-endwhile()
+ endif ()
+endwhile ()
-while(verification_done LESS "2")
- message(STATUS "checking second stage:${TEST_FOLDER}/${TEST_ARGS1}")
- if(EXISTS ${TEST_FOLDER}/${TEST_ERR})
+while (verification_done LESS "2")
+ message (STATUS "checking second stage:${TEST_FOLDER}/${TEST_ARGS1}")
+ if (EXISTS ${TEST_FOLDER}/${TEST_ERR})
# Error exit script
- set(verification_done "3")
- elseif(EXISTS ${TEST_FOLDER}/${TEST_ARGS1})
+ set (verification_done "3")
+ elseif (EXISTS ${TEST_FOLDER}/${TEST_ARGS1})
file (STRINGS ${TEST_FOLDER}/${TEST_ARGS1} v1)
list (LENGTH v1 len_v1)
- message(STATUS "v1:${v1} len_v1:${len_v1}")
- if (NOT "${len_v1}" STREQUAL "0")
+ message (STATUS "v1:${v1} len_v1:${len_v1}")
+ if (len_v1)
list (GET v1 0 param1)
list (GET v1 -1 param2)
endif ()
- file(REMOVE ${TEST_FOLDER}/${TEST_ARGS1})
- message(STATUS "PARAM1:${param1} PARAM2:${param2}")
+ file (REMOVE ${TEST_FOLDER}/${TEST_ARGS1})
+ message (STATUS "PARAM1:${param1} PARAM2:${param2}")
- if(${param1} MATCHES "VERIFICATION_DONE")
- set(verification_done "2")
- file(WRITE ${TEST_FOLDER}/${TEST_ARGS2} "all refresh verification complete")
- message(STATUS "write: ${TEST_FOLDER}/${TEST_ARGS2}")
- else()
- message(STATUS "execute: ${TEST_PROGRAM} ${param1}")
+ if (param1 MATCHES "VERIFICATION_DONE")
+ set (verification_done "2")
+ file (WRITE ${TEST_FOLDER}/${TEST_ARGS2} "all refresh verification complete")
+ message (STATUS "write: ${TEST_FOLDER}/${TEST_ARGS2}")
+ else ()
+ message (STATUS "execute: ${TEST_PROGRAM} ${param1}")
execute_process (
COMMAND ${TEST_PROGRAM} ${param1}
RESULT_VARIABLE TEST_RESULT
@@ -141,22 +141,22 @@ while(verification_done LESS "2")
ERROR_VARIABLE TEST_ERROR
WORKING_DIRECTORY ${TEST_FOLDER}
)
- message(STATUS "refresh verification: ${TEST_OUT}")
- if (NOT "${TEST_RESULT}" STREQUAL "0")
+ message (STATUS "refresh verification: ${TEST_OUT}")
+ if (TEST_RESULT)
message (FATAL_ERROR "Failed: The refresh verification failed ${TEST_RESULT}: ${TEST_ERROR}")
endif ()
- file(WRITE ${TEST_FOLDER}/${TEST_ARGS2} "refresh verifiction process done")
- endif()
- else()
- message(STATUS "waiting: ${TEST_FOLDER}/${TEST_ARGS1}")
+ file (WRITE ${TEST_FOLDER}/${TEST_ARGS2} "refresh verifiction process done")
+ endif ()
+ else ()
+ message (STATUS "waiting: ${TEST_FOLDER}/${TEST_ARGS1}")
#execute_process (COMMAND ${CMAKE_COMMAND} -E sleep 2)
- endif()
-endwhile()
+ endif ()
+endwhile ()
message (STATUS "COMMAND Result: ${TEST_RESULT}")
# if the return value is !=${TEST_EXPECT} bail out
-if (NOT "${TEST_RESULT}" STREQUAL "${TEST_EXPECT}")
+if (NOT TEST_RESULT EQUAL TEST_EXPECT)
if (NOT TEST_NOERRDISPLAY)
if (EXISTS ${TEST_FOLDER}/${TEST_OUTPUT})
file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
diff --git a/testpar/CMakeLists.txt b/testpar/CMakeLists.txt
index 71459c7..96ce0c0 100644
--- a/testpar/CMakeLists.txt
+++ b/testpar/CMakeLists.txt
@@ -58,8 +58,8 @@ set (H5P_TESTS
t_filters_parallel
)
-foreach (testp ${H5P_TESTS})
- ADD_H5P_EXE(${testp})
+foreach (h5_testp ${H5P_TESTS})
+ ADD_H5P_EXE(${h5_testp})
endforeach ()
include (CMakeTests.cmake)
diff --git a/testpar/CMakeTests.cmake b/testpar/CMakeTests.cmake
index 12ccc58..214801b 100644
--- a/testpar/CMakeTests.cmake
+++ b/testpar/CMakeTests.cmake
@@ -26,7 +26,7 @@ add_test (NAME MPI_TEST-clear-testphdf5-objects
set_tests_properties (MPI_TEST-clear-testphdf5-objects PROPERTIES FIXTURES_SETUP par_clear_testphdf5)
set (SKIP_testphdf5 "")
-#if (${HDF5_OPENMPI_VERSION_SKIP})
+#if (HDF5_OPENMPI_VERSION_SKIP)
# set (SKIP_testphdf5 "${SKIP_testphdf5};-x;ecdsetw")
#endif ()
@@ -36,12 +36,12 @@ set_tests_properties (MPI_TEST_testphdf5 PROPERTIES
ENVIRONMENT "HDF5_ALARM_SECONDS=3600;srcdir=${HDF5_TEST_PAR_BINARY_DIR}"
WORKING_DIRECTORY ${HDF5_TEST_PAR_BINARY_DIR}
)
-if (NOT "${last_test}" STREQUAL "")
+if (last_test)
set_tests_properties (MPI_TEST_testphdf5 PROPERTIES DEPENDS ${last_test})
endif ()
set (last_test "MPI_TEST_testphdf5")
-#if (${HDF5_OPENMPI_VERSION_SKIP})
+#if (HDF5_OPENMPI_VERSION_SKIP)
# list (REMOVE_ITEM H5P_TESTS t_shapesame)
#endif ()
@@ -74,17 +74,17 @@ add_test (NAME MPI_TEST-clear-objects
)
set_tests_properties (MPI_TEST-clear-objects PROPERTIES FIXTURES_SETUP par_clear_objects)
-foreach (testp ${H5P_TESTS})
- add_test (NAME MPI_TEST_${testp} COMMAND ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_PREFLAGS} $<TARGET_FILE:${testp}> ${MPIEXEC_POSTFLAGS})
- set_tests_properties (MPI_TEST_${testp} PROPERTIES
+foreach (h5_testp ${H5P_TESTS})
+ add_test (NAME MPI_TEST_${h5_testp} COMMAND ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_PREFLAGS} $<TARGET_FILE:${h5_testp}> ${MPIEXEC_POSTFLAGS})
+ set_tests_properties (MPI_TEST_${h5_testp} PROPERTIES
FIXTURES_REQUIRED par_clear_objects
ENVIRONMENT "HDF5_ALARM_SECONDS=3600;srcdir=${HDF5_TEST_PAR_BINARY_DIR}"
WORKING_DIRECTORY ${HDF5_TEST_PAR_BINARY_DIR}
)
- if (NOT "${last_test}" STREQUAL "")
- set_tests_properties (MPI_TEST_${testp} PROPERTIES DEPENDS ${last_test})
+ if (last_test)
+ set_tests_properties (MPI_TEST_${h5_testp} PROPERTIES DEPENDS ${last_test})
endif ()
- set (last_test "MPI_TEST_${testp}")
+ set (last_test "MPI_TEST_${h5_testp}")
endforeach ()
# The t_pflush1 test is hard-coded to fail.
diff --git a/testpar/CMakeVFDTests.cmake b/testpar/CMakeVFDTests.cmake
index de16a31..c0b848b 100644
--- a/testpar/CMakeVFDTests.cmake
+++ b/testpar/CMakeVFDTests.cmake
@@ -39,27 +39,27 @@ endforeach ()
macro (ADD_VFD_TEST vfdname resultcode)
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
- foreach (test ${H5P_VFD_TESTS})
+ foreach (h5_test ${H5P_VFD_TESTS})
add_test (
- NAME MPI_TEST_VFD-${vfdname}-${test}-clear-objects
+ NAME MPI_TEST_VFD-${vfdname}-${h5_test}-clear-objects
COMMAND ${CMAKE_COMMAND}
-E remove
- ${vfdname}-shared/${vfdname}-${test}.out
- ${vfdname}-shared/${vfdname}-${test}.out.err
+ ${vfdname}-shared/${vfdname}-${h5_test}.out
+ ${vfdname}-shared/${vfdname}-${h5_test}.out.err
)
add_test (
- NAME MPI_TEST_VFD-${vfdname}-${test}
+ NAME MPI_TEST_VFD-${vfdname}-${h5_test}
COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:${test}>"
+ -D "TEST_PROGRAM=$<TARGET_FILE:${h5_test}>"
-D "TEST_ARGS:STRING="
-D "TEST_VFD:STRING=${vfdname}"
-D "TEST_EXPECT=${resultcode}"
- -D "TEST_OUTPUT=${vfdname}-${test}.out"
+ -D "TEST_OUTPUT=${vfdname}-${h5_test}.out"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}"
-P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
)
- set_tests_properties (MPI_TEST_VFD-${vfdname}-${test} PROPERTIES
- DEPENDS MPI_TEST_VFD-${vfdname}-${test}-clear-objects
+ set_tests_properties (MPI_TEST_VFD-${vfdname}-${h5_test} PROPERTIES
+ DEPENDS MPI_TEST_VFD-${vfdname}-${h5_test}-clear-objects
ENVIRONMENT "srcdir=${HDF5_TEST_PAR_BINARY_DIR}/${vfdname}"
WORKING_DIRECTORY ${HDF5_TEST_PAR_BINARY_DIR}/${vfdname}
)
@@ -68,6 +68,6 @@ endforeach ()
endmacro ()
# Run test with different Virtual File Driver
- foreach (vfd ${VFD_LIST})
- ADD_VFD_TEST (${vfd} 0)
+ foreach (h5_vfd ${VFD_LIST})
+ ADD_VFD_TEST (${h5_vfd} 0)
endforeach ()
diff --git a/tools/test/h5copy/CMakeTests.cmake b/tools/test/h5copy/CMakeTests.cmake
index f31068b..85a8788 100644
--- a/tools/test/h5copy/CMakeTests.cmake
+++ b/tools/test/h5copy/CMakeTests.cmake
@@ -70,7 +70,7 @@
COMMAND $<TARGET_FILE:h5copy> -f ${fparam} -i ./testfiles/${infile} -o ./testfiles/${testname}.out.h5 ${vparam} ${sparam} ${srcname} ${dparam} ${dstname} ${ARGN}
)
if (HDF5_ENABLE_USING_MEMCHECKER)
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (H5COPY_F-${testname} PROPERTIES DEPENDS ${last_test})
endif ()
else ()
@@ -78,13 +78,13 @@
endif ()
# resultcode=2 will cause the test to skip the diff test
- if (NOT "${resultcode}" STREQUAL "2")
+ if (NOT ${resultcode} EQUAL 2)
add_test (
NAME H5COPY_F-${testname}-DIFF
COMMAND $<TARGET_FILE:h5diff> -v ./testfiles/${infile} ./testfiles/${testname}.out.h5 ${srcname} ${dstname}
)
set_tests_properties (H5COPY_F-${testname}-DIFF PROPERTIES DEPENDS H5COPY_F-${testname})
- if ("${resultcode}" STREQUAL "1")
+ if (${resultcode} EQUAL 1)
set_tests_properties (H5COPY_F-${testname}-DIFF PROPERTIES WILL_FAIL "true")
endif ()
endif ()
@@ -106,7 +106,7 @@
COMMAND $<TARGET_FILE:h5copy> -i ./testfiles/${infile} -o ./testfiles/${testname}.out.h5 ${vparam} ${sparam} ${srcname} ${dparam} ${dstname} ${ARGN}
)
if (HDF5_ENABLE_USING_MEMCHECKER)
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (H5COPY-${testname} PROPERTIES DEPENDS ${last_test})
endif ()
else ()
@@ -114,13 +114,13 @@
endif ()
# resultcode=2 will cause the test to skip the diff test
- if (NOT "${resultcode}" STREQUAL "2")
+ if (NOT ${resultcode} EQUAL 2)
add_test (
NAME H5COPY-${testname}-DIFF
COMMAND $<TARGET_FILE:h5diff> -v ./testfiles/${infile} ./testfiles/${testname}.out.h5 ${srcname} ${dstname}
)
set_tests_properties (H5COPY-${testname}-DIFF PROPERTIES DEPENDS H5COPY-${testname})
- if ("${resultcode}" STREQUAL "1")
+ if (${resultcode} EQUAL 1)
set_tests_properties (H5COPY-${testname}-DIFF PROPERTIES WILL_FAIL "true")
endif ()
endif ()
@@ -152,7 +152,7 @@
COMMAND $<TARGET_FILE:h5copy> -i ./testfiles/${infile} -o ./testfiles/${testname}.out.h5 -v -s ${psparam} -d ${pdparam}
)
if (HDF5_ENABLE_USING_MEMCHECKER)
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (H5COPY-${testname}-prefill PROPERTIES DEPENDS ${last_test})
endif ()
else ()
@@ -165,13 +165,13 @@
)
set_tests_properties (H5COPY-${testname} PROPERTIES DEPENDS H5COPY-${testname}-prefill)
# resultcode=2 will cause the test to skip the diff test
- if (NOT "${resultcode}" STREQUAL "2")
+ if (NOT ${resultcode} EQUAL 2)
add_test (
NAME H5COPY-${testname}-DIFF
COMMAND $<TARGET_FILE:h5diff> -v ./testfiles/${infile} ./testfiles/${testname}.out.h5 ${srcname} ${dstname}
)
set_tests_properties (H5COPY-${testname}-DIFF PROPERTIES DEPENDS H5COPY-${testname})
- if ("${resultcode}" STREQUAL "1")
+ if (${resultcode} EQUAL 1)
set_tests_properties (H5COPY-${testname}-DIFF PROPERTIES WILL_FAIL "true")
endif ()
endif ()
@@ -193,7 +193,7 @@
COMMAND $<TARGET_FILE:h5copy> -i ./testfiles/${pfile} -o ./testfiles/${testname}.out.h5 -v -s ${psparam} -d ${pdparam}
)
if (HDF5_ENABLE_USING_MEMCHECKER)
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (H5COPY_SAME-${testname}-prefill PROPERTIES DEPENDS ${last_test})
endif ()
else (HDF5_ENABLE_USING_MEMCHECKER)
@@ -206,13 +206,13 @@
)
set_tests_properties (H5COPY_SAME-${testname} PROPERTIES DEPENDS H5COPY_SAME-${testname}-prefill)
# resultcode=2 will cause the test to skip the diff test
- if (NOT "${resultcode}" STREQUAL "2")
+ if (NOT ${resultcode} EQUAL 2)
add_test (
NAME H5COPY_SAME-${testname}-DIFF
COMMAND $<TARGET_FILE:h5diff> -v ./testfiles/${testname}.out.h5 ./testfiles/${testname}.out.h5 ${srcname} ${dstname}
)
set_tests_properties (H5COPY_SAME-${testname}-DIFF PROPERTIES DEPENDS H5COPY_SAME-${testname})
- if ("${resultcode}" STREQUAL "1")
+ if (${resultcode} EQUAL 1)
set_tests_properties (H5COPY_SAME-${testname}-DIFF PROPERTIES WILL_FAIL "true")
endif ()
endif ()
@@ -226,10 +226,10 @@
# If using memchecker add tests without using scripts
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME H5COPY-CMP-${testname} COMMAND $<TARGET_FILE:h5copy> -i ./testfiles/${infile} -o ./testfiles/${testname}.out.h5 ${vparam} ${sparam} ${srcname} ${dparam} ${dstname} ${ARGN})
- if ("${resultcode}" STREQUAL "1")
+ if (${resultcode} EQUAL 1)
set_tests_properties (H5COPY-CMP-${testname} PROPERTIES WILL_FAIL "true")
endif ()
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (H5COPY-CMP-${testname} PROPERTIES DEPENDS ${last_test})
endif ()
else ()
@@ -272,7 +272,7 @@
testfiles/${testname}.out.h5.out
testfiles/${testname}.out.h5.out.err
)
- if ("${resultcode}" STREQUAL "2")
+ if (${resultcode} EQUAL 2)
add_test (
NAME H5COPY_UD-${testname}
COMMAND "${CMAKE_COMMAND}"
@@ -335,7 +335,7 @@
testfiles/${testname}_ERR.out.h5.out
testfiles/${testname}_ERR.out.h5.out.err
)
- if ("${resultcode}" STREQUAL "2")
+ if (${resultcode} EQUAL 2)
add_test (
NAME H5COPY_UD_ERR-${testname}
COMMAND "${CMAKE_COMMAND}"
@@ -443,7 +443,7 @@
h5copy_misc1.out.out.err
)
set_tests_properties (H5COPY-clearall-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (H5COPY-clearall-objects PROPERTIES DEPENDS ${last_test})
endif ()
set (last_test "H5COPY-clearall-objects")
diff --git a/tools/test/h5diff/CMakeTests.cmake b/tools/test/h5diff/CMakeTests.cmake
index 1376e0d..6bce3f7 100644
--- a/tools/test/h5diff/CMakeTests.cmake
+++ b/tools/test/h5diff/CMakeTests.cmake
@@ -354,10 +354,10 @@
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME H5DIFF-${resultfile} COMMAND $<TARGET_FILE:h5diff> ${ARGN})
set_tests_properties (H5DIFF-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
- if (NOT "${resultcode}" STREQUAL "0")
+ if (${resultcode})
set_tests_properties (H5DIFF-${resultfile} PROPERTIES WILL_FAIL "true")
endif ()
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (H5DIFF-${resultfile} PROPERTIES DEPENDS ${last_test})
endif ()
else ()
@@ -369,7 +369,7 @@
testfiles/${resultfile}.out
testfiles/${resultfile}.out.err
)
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (H5DIFF-${resultfile}-clear-objects PROPERTIES DEPENDS ${last_test})
endif ()
add_test (
@@ -396,10 +396,10 @@
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME MPI_TEST_H5DIFF-${resultfile} COMMAND ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_PREFLAGS} $<TARGET_FILE:ph5diff> ${MPIEXEC_POSTFLAGS} ${ARGN})
set_tests_properties (MPI_TEST_H5DIFF-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/PAR/testfiles")
- if (NOT "${resultcode}" STREQUAL "0")
+ if (${resultcode})
set_tests_properties (MPI_TEST_H5DIFF-${resultfile} PROPERTIES WILL_FAIL "true")
endif ()
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (MPI_TEST_H5DIFF-${resultfile} PROPERTIES DEPENDS ${last_test})
endif ()
else ()
@@ -411,7 +411,7 @@
PAR/testfiles/${resultfile}.out
PAR/testfiles/${resultfile}.out.err
)
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (MPI_TEST_H5DIFF-${resultfile}-clear-objects PROPERTIES DEPENDS ${last_test})
endif ()
add_test (
@@ -444,7 +444,7 @@
testfiles/${resultfile}.out
testfiles/${resultfile}.out.err
)
- if ("${resultcode}" STREQUAL "2")
+ if (${resultcode} EQUAL 2)
add_test (
NAME H5DIFF_UD-${testname}
COMMAND "${CMAKE_COMMAND}"
@@ -925,7 +925,7 @@
h5diff_vlstr.out.err
)
set_tests_properties (H5DIFF-clearall-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (H5DIFF-clearall-objects PROPERTIES DEPENDS ${last_test})
endif ()
set (last_test "H5DIFF-clearall-objects")
diff --git a/tools/test/h5dump/CMakeTests.cmake b/tools/test/h5dump/CMakeTests.cmake
index 382e664..16dbc4d 100644
--- a/tools/test/h5dump/CMakeTests.cmake
+++ b/tools/test/h5dump/CMakeTests.cmake
@@ -406,7 +406,7 @@
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME H5DUMP-${testname} COMMAND $<TARGET_FILE:h5dump> ${ARGN})
set_tests_properties (H5DUMP-${testname} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (H5DUMP-${testname} PROPERTIES DEPENDS ${last_test})
endif ()
set (last_test "H5DUMP-${testname}")
@@ -419,7 +419,7 @@
testfiles/std/h5dump-${testname}.out
testfiles/std/h5dump-${testname}.out.err
)
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (H5DUMP-${testname}-clear-objects PROPERTIES DEPENDS ${last_test})
endif ()
add_test (
@@ -456,10 +456,10 @@
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME H5DUMP-${resultfile} COMMAND $<TARGET_FILE:h5dump> ${ARGN})
set_tests_properties (H5DUMP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
- if (NOT "${resultcode}" STREQUAL "0")
+ if (${resultcode})
set_tests_properties (H5DUMP-${resultfile} PROPERTIES WILL_FAIL "true")
endif ()
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (H5DUMP-${resultfile} PROPERTIES DEPENDS ${last_test})
endif ()
else ()
@@ -492,10 +492,10 @@
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME H5DUMP-N-${resultfile} COMMAND $<TARGET_FILE:h5dump> ${ARGN})
set_tests_properties (H5DUMP-N-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
- if (NOT "${resultcode}" STREQUAL "0")
+ if (${resultcode})
set_tests_properties (H5DUMP-N-${resultfile} PROPERTIES WILL_FAIL "true")
endif ()
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (H5DUMP-N-${resultfile} PROPERTIES DEPENDS ${last_test})
endif ()
else ()
@@ -528,10 +528,10 @@
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME H5DUMP-${resultfile} COMMAND $<TARGET_FILE:h5dump> ${ARGN} ${resultfile}.txt ${targetfile})
set_tests_properties (H5DUMP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
- if (NOT "${resultcode}" STREQUAL "0")
+ if (${resultcode})
set_tests_properties (H5DUMP-${resultfile} PROPERTIES WILL_FAIL "true")
endif ()
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (H5DUMP-${resultfile} PROPERTIES DEPENDS ${last_test})
endif ()
else ()
@@ -571,10 +571,10 @@
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME H5DUMP-${resultfile} COMMAND $<TARGET_FILE:h5dump> --ddl=${ddlfile}.txt ${ARGN} ${resultfile}.txt ${targetfile})
set_tests_properties (H5DUMP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
- if (NOT "${resultcode}" STREQUAL "0")
+ if (${resultcode})
set_tests_properties (H5DUMP-${resultfile} PROPERTIES WILL_FAIL "true")
endif ()
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (H5DUMP-${resultfile} PROPERTIES DEPENDS ${last_test})
endif ()
else ()
@@ -1149,7 +1149,7 @@
zerodim.out.err
)
set_tests_properties (H5DUMP-clearall-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (H5DUMP-clearall-objects PROPERTIES DEPENDS ${last_test})
endif ()
set (last_test "H5DUMP-clearall-objects")
diff --git a/tools/test/h5dump/CMakeTestsPBITS.cmake b/tools/test/h5dump/CMakeTestsPBITS.cmake
index 4f3ee9f..a8ccb7d 100644
--- a/tools/test/h5dump/CMakeTestsPBITS.cmake
+++ b/tools/test/h5dump/CMakeTestsPBITS.cmake
@@ -124,10 +124,10 @@
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME H5DUMP-${resultfile} COMMAND $<TARGET_FILE:h5dump> ${ARGN})
set_tests_properties (H5DUMP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/pbits")
- if (NOT ${resultcode} STREQUAL "0")
+ if (${resultcode})
set_tests_properties (H5DUMP-${resultfile} PROPERTIES WILL_FAIL "true")
endif ()
- if (NOT "${last_pbits_test}" STREQUAL "")
+ if (last_pbits_test)
set_tests_properties (H5DUMP-${resultfile} PROPERTIES DEPENDS ${last_pbits_test})
endif ()
else ()
@@ -275,7 +275,7 @@
tpbitsUnsignedLongLong16.out.err
)
set_tests_properties (H5DUMP_PACKED_BITS-clearall-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/pbits")
- if (NOT "${last_pbits_test}" STREQUAL "")
+ if (last_pbits_test)
set_tests_properties (H5DUMP_PACKED_BITS-clearall-objects PROPERTIES DEPENDS ${last_pbits_test})
endif ()
set (last_pbits_test "H5DUMP_PACKED_BITS-clearall-objects")
diff --git a/tools/test/h5dump/CMakeTestsVDS.cmake b/tools/test/h5dump/CMakeTestsVDS.cmake
index 922e79e..d7e3b88 100644
--- a/tools/test/h5dump/CMakeTestsVDS.cmake
+++ b/tools/test/h5dump/CMakeTestsVDS.cmake
@@ -120,10 +120,10 @@
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME H5DUMP-${resultfile} COMMAND $<TARGET_FILE:h5dump> ${ARGN})
set_tests_properties (H5DUMP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/vds")
- if (NOT "${resultcode}" STREQUAL "0")
+ if (${resultcode})
set_tests_properties (H5DUMP-${resultfile} PROPERTIES WILL_FAIL "true")
endif ()
- if (NOT "${last_vds_test}" STREQUAL "")
+ if (last_vds_test)
set_tests_properties (H5DUMP-${resultfile} PROPERTIES DEPENDS ${last_VDS_test})
endif ()
else ()
@@ -159,10 +159,10 @@
ENVIRONMENT "HDF5_VDS_PREFIX=${PROJECT_BINARY_DIR}/testfiles/vds/"
WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/vds/prefix"
)
- if (NOT "${resultcode}" STREQUAL "0")
+ if (${resultcode})
set_tests_properties (H5DUMP_PREFIX-${resultfile} PROPERTIES WILL_FAIL "true")
endif ()
- if (NOT "${last_vds_test}" STREQUAL "")
+ if (last_vds_test)
set_tests_properties (H5DUMP_PREFIX-${resultfile} PROPERTIES DEPENDS ${last_VDS_test})
endif ()
else ()
@@ -197,10 +197,10 @@
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME H5DUMP-${resultfile} COMMAND $<TARGET_FILE:h5dump> -p ${ARGN})
set_tests_properties (H5DUMP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/vds")
- if (NOT "${resultcode}" STREQUAL "0")
+ if (${resultcode})
set_tests_properties (H5DUMP-${resultfile} PROPERTIES WILL_FAIL "true")
endif ()
- if (NOT "${last_vds_test}" STREQUAL "")
+ if (last_vds_test)
set_tests_properties (H5DUMP-${resultfile} PROPERTIES DEPENDS ${last_VDS_test})
endif ()
else ()
@@ -276,7 +276,7 @@
vds_layout-maxmin.out.err
)
set_tests_properties (H5DUMP_VDS-clearall-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/vds")
- if (NOT "${last_vds_test}" STREQUAL "")
+ if (last_vds_test)
set_tests_properties (H5DUMP_VDS-clearall-objects PROPERTIES DEPENDS ${last_vds_test})
endif ()
set (last_VDS_test "H5DUMP_VDS-clearall-objects")
diff --git a/tools/test/h5dump/CMakeTestsXML.cmake b/tools/test/h5dump/CMakeTestsXML.cmake
index de87d2f..e48cec1 100644
--- a/tools/test/h5dump/CMakeTestsXML.cmake
+++ b/tools/test/h5dump/CMakeTestsXML.cmake
@@ -178,10 +178,10 @@
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME H5DUMP_XML-${resultfile} COMMAND $<TARGET_FILE:h5dump> --xml ${ARGN})
set_tests_properties (H5DUMP_XML-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/xml")
- if (NOT "${resultcode}" STREQUAL "0")
+ if (${resultcode})
set_tests_properties (H5DUMP_XML-${resultfile} PROPERTIES WILL_FAIL "true")
endif ()
- if (NOT "${last_xml_test}" STREQUAL "")
+ if (last_xml_test)
set_tests_properties (H5DUMP_XML-${resultfile} PROPERTIES DEPENDS ${last_xml_test})
endif ()
else ()
@@ -357,7 +357,7 @@
tvlstr.h5.out.err
)
set_tests_properties (H5DUMP-XML-clearall-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/xml")
- if (NOT "${last_xml_test}" STREQUAL "")
+ if (last_xml_test)
set_tests_properties (H5DUMP-XML-clearall-objects PROPERTIES DEPENDS ${last_xml_test})
endif ()
set (last_test "H5DUMP-XML-clearall-objects")
diff --git a/tools/test/h5format_convert/CMakeTests.cmake b/tools/test/h5format_convert/CMakeTests.cmake
index 5792d40..5599c1b 100644
--- a/tools/test/h5format_convert/CMakeTests.cmake
+++ b/tools/test/h5format_convert/CMakeTests.cmake
@@ -108,10 +108,10 @@
./testfiles/${testname}.out
./testfiles/${testname}.out.err
)
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (H5FC-${testname}-clear-objects PROPERTIES DEPENDS ${last_test})
endif ()
- if (NOT "${testfile}" STREQUAL "")
+ if (${testfile})
add_test (
NAME H5FC-${testname}-${testfile}-tmpfile
COMMAND ${CMAKE_COMMAND}
@@ -161,7 +161,7 @@
./testfiles/${testname}.out
./testfiles/${testname}.out.err
)
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (H5FC-${testname}-clear-objects PROPERTIES DEPENDS ${last_test})
endif ()
add_test (
@@ -197,48 +197,30 @@
./testfiles/${testname}.out
./testfiles/${testname}.out.err
)
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (H5FC-${testname}-clear-objects PROPERTIES DEPENDS ${last_test})
endif ()
- if (NOT "${testfile}" STREQUAL "")
- add_test (
- NAME H5FC-${testname}-${testfile}-tmpfile
- COMMAND ${CMAKE_COMMAND}
- -E copy_if_different ${HDF5_TOOLS_TEST_H5FC_SOURCE_DIR}/testfiles/${testfile} ./testfiles/outtmp.h5
- )
- set_tests_properties (H5FC-${testname}-${testfile}-tmpfile PROPERTIES DEPENDS "H5FC-${testname}-clear-objects")
- add_test (
- NAME H5FC-${testname}-${testfile}
- COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5format_convert>"
- -D "TEST_ARGS=${ARGN};outtmp.h5"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
- -D "TEST_OUTPUT=${testname}.out"
- -D "TEST_EXPECT=${resultcode}"
- -D "TEST_REFERENCE=${resultfile}"
- -D "TEST_ERRREF=${resultfile}.err"
- -D "TEST_MASK_ERROR=true"
- -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
- )
- set_tests_properties (H5FC-${testname}-${testfile} PROPERTIES DEPENDS "H5FC-${testname}-${testfile}-tmpfile")
- set (last_test "H5FC-${testname}-${testfile}")
- else ()
- add_test (
- NAME H5FC-${testname}-NA
- COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5format_convert>"
- -D "TEST_ARGS=${ARGN}"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
- -D "TEST_OUTPUT=${testname}.out"
- -D "TEST_EXPECT=${resultcode}"
- -D "TEST_REFERENCE=${resultfile}"
- -D "TEST_ERRREF=${resultfile}.err"
- -D "TEST_MASK_ERROR=true"
- -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
- )
- set_tests_properties (H5FC-${testname}-NA PROPERTIES DEPENDS "H5FC-${testname}-clear-objects")
- set (last_test "H5FC-${testname}-NA")
- endif ()
+ add_test (
+ NAME H5FC-${testname}-${testfile}-tmpfile
+ COMMAND ${CMAKE_COMMAND}
+ -E copy_if_different ${HDF5_TOOLS_TEST_H5FC_SOURCE_DIR}/testfiles/${testfile} ./testfiles/outtmp.h5
+ )
+ set_tests_properties (H5FC-${testname}-${testfile}-tmpfile PROPERTIES DEPENDS "H5FC-${testname}-clear-objects")
+ add_test (
+ NAME H5FC-${testname}-${testfile}
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5format_convert>"
+ -D "TEST_ARGS=${ARGN};outtmp.h5"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
+ -D "TEST_OUTPUT=${testname}.out"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_REFERENCE=${resultfile}"
+ -D "TEST_ERRREF=${resultfile}.err"
+ -D "TEST_MASK_ERROR=true"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ )
+ set_tests_properties (H5FC-${testname}-${testfile} PROPERTIES DEPENDS "H5FC-${testname}-${testfile}-tmpfile")
+ set (last_test "H5FC-${testname}-${testfile}")
endif ()
endmacro ()
@@ -253,7 +235,7 @@
./testfiles/${testname}.out
./testfiles/${testname}.out.err
)
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (H5FC-${testname}-clear-objects PROPERTIES DEPENDS ${last_test})
endif ()
add_test (
@@ -300,7 +282,7 @@
./testfiles/${testname}.out
./testfiles/${testname}.out.err
)
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (H5FC-${testname}-clear-objects PROPERTIES DEPENDS ${last_test})
endif ()
add_test (
@@ -343,7 +325,7 @@
./testfiles/${testname}_chk.out
./testfiles/${testname}_chk.out.err
)
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (H5FC-${testname}-clear-objects PROPERTIES DEPENDS ${last_test})
endif ()
add_test (
@@ -449,7 +431,7 @@
chktmp.h5
dmptmp.h5
)
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (H5FC-clearall-objects PROPERTIES DEPENDS ${last_test})
endif ()
set (last_test "H5FC-clearall-objects")
diff --git a/tools/test/h5import/CMakeTests.cmake b/tools/test/h5import/CMakeTests.cmake
index 7d76fba..1090640 100644
--- a/tools/test/h5import/CMakeTests.cmake
+++ b/tools/test/h5import/CMakeTests.cmake
@@ -99,7 +99,7 @@
# If using memchecker skip macro based tests
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME H5IMPORT-${testname} COMMAND $<TARGET_FILE:h5import> ${importfile} -c ${conffile} -o ${testfile})
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (H5IMPORT-${testname} PROPERTIES DEPENDS H5IMPORT-h5importtest)
endif ()
else ()
@@ -499,7 +499,7 @@
binuin32.bin
binuin32.conf
)
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (H5IMPORT-h5importtest-clear-objects PROPERTIES DEPENDS ${last_test})
endif ()
set (last_test "H5IMPORT-clear-objects")
diff --git a/tools/test/h5jam/CMakeTests.cmake b/tools/test/h5jam/CMakeTests.cmake
index 2d00b86..677ba5c 100644
--- a/tools/test/h5jam/CMakeTests.cmake
+++ b/tools/test/h5jam/CMakeTests.cmake
@@ -55,7 +55,7 @@
# If using memchecker add tests without using scripts
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME H5JAM-${expectfile} COMMAND $<TARGET_FILE:h5jam> ${ARGN})
- if (NOT "${resultcode}" STREQUAL "0")
+ if (${resultcode})
set_tests_properties (H5JAM-${expectfile} PROPERTIES WILL_FAIL "true")
endif ()
else ()
@@ -91,7 +91,7 @@
# If using memchecker add tests without using scripts
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME H5JAM-UNJAM-${expectfile} COMMAND $<TARGET_FILE:h5unjam> ${ARGN})
- if (NOT "${resultcode}" STREQUAL "0")
+ if (${resultcode})
set_tests_properties (H5JAM-UNJAM-${expectfile} PROPERTIES WILL_FAIL "true")
endif ()
else ()
@@ -205,7 +205,7 @@
set (compare_test "")
endif ()
endif ()
- if (NOT "${compare_test}" STREQUAL "")
+ if (${compare_test})
add_test (
NAME H5JAM-${testname}-UNJAM-CHECK_UB_1-clear-objects
COMMAND ${CMAKE_COMMAND}
@@ -244,7 +244,7 @@
-D "TEST_OFILE=NULL"
-P "${HDF_RESOURCES_DIR}/userblockTest.cmake"
)
- if (NOT "${compare_test}" STREQUAL "")
+ if (${compare_test})
set_tests_properties (H5JAM-${testname}-UNJAM-CHECK_NOUB PROPERTIES DEPENDS H5JAM-${testname}-UNJAM-CHECK_UB_1)
else ()
set_tests_properties (H5JAM-${testname}-UNJAM-CHECK_NOUB PROPERTIES DEPENDS H5JAM-${testname}-UNJAM)
diff --git a/tools/test/h5ls/CMakeTests.cmake b/tools/test/h5ls/CMakeTests.cmake
index 116d097..95af5ab 100644
--- a/tools/test/h5ls/CMakeTests.cmake
+++ b/tools/test/h5ls/CMakeTests.cmake
@@ -139,10 +139,10 @@
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME H5LS-${resultfile} COMMAND $<TARGET_FILE:h5ls> ${ARGN})
set_tests_properties (H5LS-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
- if ("${resultcode}" STREQUAL "1")
+ if (${resultcode} EQUAL 1)
set_tests_properties (H5LS-${resultfile} PROPERTIES WILL_FAIL "true")
endif ()
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (H5LS-${resultfile} PROPERTIES DEPENDS ${last_test})
endif ()
else ()
@@ -174,10 +174,10 @@
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME H5LS-${resultfile} COMMAND $<TARGET_FILE:h5ls> ${ARGN})
set_tests_properties (H5LS-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
- if ("${resultcode}" STREQUAL "1")
+ if (${resultcode} EQUAL 1)
set_tests_properties (H5LS-${resultfile} PROPERTIES WILL_FAIL "true")
endif ()
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (H5LS-${resultfile} PROPERTIES DEPENDS ${last_test})
endif ()
else ()
@@ -354,7 +354,7 @@
tvldtypes2be.out.err
)
set_tests_properties (H5LS-clearall-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (H5LS-clearall-objects PROPERTIES DEPENDS ${last_test})
endif ()
set (last_test "H5LS-clearall-objects")
diff --git a/tools/test/h5ls/CMakeTestsVDS.cmake b/tools/test/h5ls/CMakeTestsVDS.cmake
index 2b6f61e..562a892 100644
--- a/tools/test/h5ls/CMakeTestsVDS.cmake
+++ b/tools/test/h5ls/CMakeTestsVDS.cmake
@@ -85,10 +85,10 @@
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME H5LS-${resultfile} COMMAND $<TARGET_FILE:h5ls> ${ARGN})
set_tests_properties (H5LS-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/vds")
- if ("${resultcode}" STREQUAL "1")
+ if (${resultcode} EQUAL 1)
set_tests_properties (H5LS-${resultfile} PROPERTIES WILL_FAIL "true")
endif ()
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (H5LS-${resultfile} PROPERTIES DEPENDS ${last_test})
endif ()
else ()
@@ -123,10 +123,10 @@
ENVIRONMENT "HDF5_VDS_PREFIX=\${ORIGIN}"
WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles"
)
- if ("${resultcode}" STREQUAL "1")
+ if (${resultcode} EQUAL 1)
set_tests_properties (H5LS_PREFIX-${resultfile} PROPERTIES WILL_FAIL "true")
endif ()
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (H5LS_PREFIX-${resultfile} PROPERTIES DEPENDS ${last_test})
endif ()
else ()
@@ -193,7 +193,7 @@
tvds_layout-5.out.err
)
set_tests_properties (H5LS_VDS-clearall-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/vds")
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (H5LS_VDS-clearall-objects PROPERTIES DEPENDS ${last_test})
endif ()
set (last_test "H5LS_VDS-clearall-objects")
diff --git a/tools/test/h5repack/CMakeTests.cmake b/tools/test/h5repack/CMakeTests.cmake
index c2a2be7..2ad12ad 100644
--- a/tools/test/h5repack/CMakeTests.cmake
+++ b/tools/test/h5repack/CMakeTests.cmake
@@ -162,7 +162,7 @@
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME H5REPACK-h5repack-${testname} COMMAND $<TARGET_FILE:h5repack> ${ARGN})
set_tests_properties (H5REPACK-h5repack-${testname} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (H5REPACK-h5repack-${testname} PROPERTIES DEPENDS ${last_test})
endif ()
set (last_test "H5REPACK-h5repack-${testname}")
@@ -174,7 +174,7 @@
testfiles/h5repack-${testname}.out
testfiles/h5repack-${testname}.out.err
)
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (H5REPACK-h5repack-${testname}-clear-objects PROPERTIES DEPENDS ${last_test})
endif ()
add_test (
@@ -208,7 +208,7 @@
-E remove
testfiles/out-${testname}.${testfile}
)
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (H5REPACK_OLD-${testname}-clear-objects PROPERTIES DEPENDS ${last_test})
endif ()
add_test (
@@ -240,7 +240,7 @@
-E remove
testfiles/out-${testname}.${testfile}
)
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (H5REPACK-${testname}-clear-objects PROPERTIES DEPENDS ${last_test})
endif ()
add_test (
@@ -272,7 +272,7 @@
NAME H5REPACK_CMP-${testname}
COMMAND $<TARGET_FILE:h5repack> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${resultfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${resultfile}
)
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (H5REPACK_CMP-${testname} PROPERTIES DEPENDS ${last_test})
endif ()
else ()
@@ -284,7 +284,7 @@
testfiles/${resultfile}-${testname}.out
testfiles/${resultfile}-${testname}.out.err
)
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (H5REPACK_CMP-${testname}-clear-objects PROPERTIES DEPENDS ${last_test})
endif ()
add_test (
@@ -320,7 +320,7 @@
NAME H5REPACK_MASK-${testname}
COMMAND $<TARGET_FILE:h5repack> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${resultfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${resultfile}
)
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (H5REPACK_MASK-${testname} PROPERTIES DEPENDS ${last_test})
endif ()
else (HDF5_ENABLE_USING_MEMCHECKER)
@@ -332,7 +332,7 @@
testfiles/${resultfile}-${testname}.out
testfiles/${resultfile}-${testname}.out.err
)
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (H5REPACK_MASK-${testname}-clear-objects PROPERTIES DEPENDS ${last_test})
endif ()
add_test (
@@ -371,7 +371,7 @@
testfiles/${resultfile}-${testname}.out
testfiles/${resultfile}-${testname}.out.err
)
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (H5REPACK_DMP-${testname}-clear-objects PROPERTIES DEPENDS ${last_test})
endif ()
add_test (
@@ -414,7 +414,7 @@
testfiles/${resultfile}-${testname}.out
testfiles/${resultfile}-${testname}.out.err
)
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (H5REPACK_STAT-${testname}-clear-objects PROPERTIES DEPENDS ${last_test})
endif ()
add_test (
@@ -458,7 +458,7 @@
testfiles/${testfile}-${testname}-v.out
testfiles/${testfile}-${testname}-v.out.err
)
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (H5REPACK_VERIFY_LAYOUT-${testname}-clear-objects PROPERTIES DEPENDS ${last_test})
endif ()
add_test (
@@ -471,7 +471,7 @@
COMMAND $<TARGET_FILE:h5diff> ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
)
set_tests_properties (H5REPACK_VERIFY_LAYOUT-${testname}_DFF PROPERTIES DEPENDS H5REPACK_VERIFY_LAYOUT-${testname})
- if ("${resultcode}" STREQUAL "0")
+ if (NOT ${resultcode})
add_test (
NAME H5REPACK_VERIFY_LAYOUT-${testname}_DMP
COMMAND "${CMAKE_COMMAND}"
@@ -533,7 +533,7 @@
testfiles/${testfile}-${testname}-v.out
testfiles/${testfile}-${testname}-v.out.err
)
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (H5REPACK_VERIFY_LAYOUT_VDS-${testname}-clear-objects PROPERTIES DEPENDS ${last_test})
endif ()
add_test (
@@ -570,7 +570,7 @@
testfiles/${testfile}-${testname}-v.out
testfiles/${testfile}-${testname}-v.out.err
)
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (H5REPACK_VERIFY_SUPERBLOCK-${testname}-clear-objects PROPERTIES DEPENDS ${last_test})
endif ()
add_test (
@@ -601,7 +601,7 @@
-E remove
testfiles/out-${testname}.${testfile}
)
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (ADD_H5_VERIFY_INVALIDBOUNDS-h5repack-${testname}-clear-objects PROPERTIES DEPENDS ${last_test})
endif ()
add_test (
@@ -624,7 +624,7 @@
testfiles/out-${testname}_N.${testname}.h5
testfiles/out-${testname}_M.${testname}.h5
)
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (H5REPACK_META-${testname}_N-clear-objects PROPERTIES DEPENDS ${last_test})
endif ()
add_test (
@@ -656,7 +656,7 @@
testfiles/${resultfile}-${testname}.out
testfiles/${resultfile}-${testname}.out.err
)
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (H5REPACK_UD-${testname}-clear-objects PROPERTIES DEPENDS ${last_test})
endif ()
add_test (
@@ -901,7 +901,7 @@
COMMAND ${CMAKE_COMMAND} -E remove ${LIST_TO_CLEAR}
)
set_tests_properties (H5REPACK-clearall-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (H5REPACK-clearall-objects PROPERTIES DEPENDS ${last_test})
endif ()
endif ()
diff --git a/tools/test/h5repack/CMakeVFDTests.cmake b/tools/test/h5repack/CMakeVFDTests.cmake
index 2042f31..e100e3c 100644
--- a/tools/test/h5repack/CMakeVFDTests.cmake
+++ b/tools/test/h5repack/CMakeVFDTests.cmake
@@ -47,7 +47,7 @@
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
-P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
)
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (H5REPACK-VFD-${vfdname}-h5repacktest PROPERTIES DEPENDS ${last_test})
endif ()
set (last_test "H5REPACK-VFD-${vfdname}-h5repacktest")
diff --git a/tools/test/h5stat/CMakeTests.cmake b/tools/test/h5stat/CMakeTests.cmake
index ec8c9b1..737f4b5 100644
--- a/tools/test/h5stat/CMakeTests.cmake
+++ b/tools/test/h5stat/CMakeTests.cmake
@@ -97,10 +97,10 @@
# If using memchecker add tests without using scripts
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME H5STAT-${resultfile} COMMAND $<TARGET_FILE:h5stat> ${ARGN})
- if (NOT "${resultcode}" STREQUAL "0")
+ if (${resultcode})
set_tests_properties (H5STAT-${resultfile} PROPERTIES WILL_FAIL "true")
endif ()
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (H5STAT-${resultfile} PROPERTIES DEPENDS ${last_test})
endif ()
else (HDF5_ENABLE_USING_MEMCHECKER)
@@ -111,7 +111,7 @@
${resultfile}.out
${resultfile}.out.err
)
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (H5STAT-${resultfile}-clear-objects PROPERTIES DEPENDS ${last_test})
endif ()
add_test (
@@ -133,10 +133,10 @@
# If using memchecker add tests without using scripts
if (HDF5_ENABLE_USING_MEMCHECKER)
add_test (NAME H5STAT-${resultfile} COMMAND $<TARGET_FILE:h5stat> ${ARGN})
- if (NOT "${resultcode}" STREQUAL "0")
+ if (${resultcode})
set_tests_properties (H5STAT-${resultfile} PROPERTIES WILL_FAIL "true")
endif ()
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (H5STAT-${resultfile} PROPERTIES DEPENDS ${last_test})
endif ()
else (HDF5_ENABLE_USING_MEMCHECKER)
@@ -147,7 +147,7 @@
${resultfile}.out
${resultfile}.out.err
)
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (H5STAT-${resultfile}-clear-objects PROPERTIES DEPENDS ${last_test})
endif ()
add_test (
@@ -182,7 +182,7 @@
COMMAND ${CMAKE_COMMAND}
-E remove ${CLEAR_LIST}
)
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (H5STAT-clearall-objects PROPERTIES DEPENDS ${last_test})
endif ()
set (last_test "H5STAT-clearall-objects")
diff --git a/tools/test/misc/CMakeTestsClear.cmake b/tools/test/misc/CMakeTestsClear.cmake
index c46ac59..24774fd 100644
--- a/tools/test/misc/CMakeTestsClear.cmake
+++ b/tools/test/misc/CMakeTestsClear.cmake
@@ -94,7 +94,7 @@
testfiles/${testname}.out
testfiles/${testname}.out.err
)
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (H5CLEAR_CMP-${testname}-clear-objects PROPERTIES DEPENDS ${last_test})
endif ()
add_test (
@@ -122,7 +122,7 @@
testfiles/${testname}.out
testfiles/${testname}.out.err
)
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (H5CLEAR_CMP-${testname}-clear-objects PROPERTIES DEPENDS ${last_test})
endif ()
add_test (
@@ -152,7 +152,7 @@
testfiles/${testname}.out.err
testfiles/${testfile}
)
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (H5CLEAR_CMP-${testname}-clear-objects PROPERTIES DEPENDS ${last_test})
endif ()
add_test (
@@ -188,7 +188,7 @@
testfiles/${testname}.out.err
testfiles/${testfile}
)
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (H5CLEAR_CMP-${testname}-clear-objects PROPERTIES DEPENDS ${last_test})
endif ()
add_test (
@@ -223,7 +223,7 @@
)
set_tests_properties (H5CLEAR_RET-${testname} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
set_tests_properties (H5CLEAR_RET-${testname} PROPERTIES WILL_FAIL "${resultcode}")
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (H5CLEAR_RET-${testname} PROPERTIES DEPENDS ${last_test})
endif ()
set (last_test "H5CLEAR_RET-${testname}")
@@ -242,7 +242,7 @@
testfiles/${testname}_after_size.out.err
testfiles/${testname}.h5
)
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (H5CLEAR_FILESIZE_TEST-${testname}-clear-objects PROPERTIES DEPENDS ${last_test})
endif ()
add_test (
@@ -302,7 +302,7 @@
-E copy_if_different
"${PROJECT_SOURCE_DIR}/testfiles/${testfile}.h5" "${PROJECT_BINARY_DIR}/testfiles/${testfile}.h5"
)
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (H5CLEAR-clr_open_chk-copy_${testname}.h5 PROPERTIES DEPENDS ${last_test})
endif ()
set (last_test "H5CLEAR-clr_open_chk-copy_${testname}.h5")
@@ -312,7 +312,7 @@
add_test (NAME H5CLEAR-clr_open_chk-${testname}_${resultcode} COMMAND $<TARGET_FILE:clear_open_chk> ${testfile}.h5)
set_tests_properties (H5CLEAR-clr_open_chk-${testname}_${resultcode} PROPERTIES WILL_FAIL "${resultcode}")
set_tests_properties (H5CLEAR-clr_open_chk-${testname}_${resultcode} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (H5CLEAR-clr_open_chk-${testname}_${resultcode} PROPERTIES DEPENDS ${last_test})
endif ()
@@ -356,7 +356,7 @@ if (HDF5_ENABLE_USING_MEMCHECKER)
mod_h5clear_mdc_image2.h5
${HDF5_TEST_FILES}
)
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (H5CLEAR-clearall-objects PROPERTIES DEPENDS ${last_test})
endif ()
set (last_test "H5CLEAR-clearall-objects")
@@ -368,7 +368,7 @@ if (HDF5_ENABLE_USING_MEMCHECKER)
-E copy_if_different
"${PROJECT_SOURCE_DIR}/testfiles/${h5_file}" "${PROJECT_BINARY_DIR}/testfiles/${h5_file}"
)
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (H5CLEAR-copy_${h5_file} PROPERTIES DEPENDS ${last_test})
endif ()
set (last_test "H5CLEAR-copy_${h5_file}")
@@ -381,7 +381,7 @@ if (HDF5_ENABLE_USING_MEMCHECKER)
-E copy_if_different
"${PROJECT_SOURCE_DIR}/testfiles/${h5_file}" "${PROJECT_BINARY_DIR}/testfiles/orig_${h5_file}"
)
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (H5CLEAR-copy_orig_${h5_file} PROPERTIES DEPENDS ${last_test})
endif ()
set (last_test "H5CLEAR-copy_orig_${h5_file}")
@@ -393,7 +393,7 @@ if (HDF5_ENABLE_USING_MEMCHECKER)
-E copy_if_different
"${PROJECT_SOURCE_DIR}/testfiles/mod_h5clear_mdc_image.h5" "${PROJECT_BINARY_DIR}/testfiles/mod_h5clear_mdc_image2.h5"
)
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (H5CLEAR-copy_mod_h5clr_mdc_image2.h5 PROPERTIES DEPENDS ${last_test})
endif ()
set (last_test "H5CLEAR-copy_mod_h5clr_mdc_image2.h5")
diff --git a/tools/test/misc/CMakeTestsMkgrp.cmake b/tools/test/misc/CMakeTestsMkgrp.cmake
index e99983b..db3b7e4 100644
--- a/tools/test/misc/CMakeTestsMkgrp.cmake
+++ b/tools/test/misc/CMakeTestsMkgrp.cmake
@@ -73,7 +73,7 @@
)
set_tests_properties (H5MKGRP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
if (HDF5_ENABLE_USING_MEMCHECKER)
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (H5MKGRP-${resultfile} PROPERTIES DEPENDS ${last_test})
endif ()
else (HDF5_ENABLE_USING_MEMCHECKER)
@@ -174,7 +174,7 @@
h5mkgrp_nested_mult_lp.out.err
)
set_tests_properties (H5MKGRP-clearall-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
- if (NOT "${last_test}" STREQUAL "")
+ if (last_test)
set_tests_properties (H5MKGRP-clearall-objects PROPERTIES DEPENDS ${last_test})
endif ()
set (last_test "H5MKGRP-clearall-objects")