Skip to content

Commit

Permalink
Check ctest output for HDF5-DIAG.
Browse files Browse the repository at this point in the history
HDF5 errors that aren't promoted to an exception by HighFive will simply
print an error message. This means that tests can pass even if there are
HDF5 errors. This will run the tests with `ctest --verbose` and check
that the output doesn't contain `"HDF5-DIAG"`.
  • Loading branch information
1uc committed Nov 21, 2023
1 parent 61fa102 commit 0508f95
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 7 deletions.
24 changes: 18 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@ jobs:
- name: Test
working-directory: ${{github.workspace}}/build
run: ctest -j2 --output-on-failure -C $BUILD_TYPE
run:
- ctest -j2 --output-on-failure -C $BUILD_TYPE
- ! ctest --verbose -C $BUILD_TYPE | grep HDF5-DIAG


# Job testing several versions of hdf5
Expand Down Expand Up @@ -118,7 +120,9 @@ jobs:
- name: Test
working-directory: ${{github.workspace}}/build
run: ctest -j2 --output-on-failure -C $BUILD_TYPE
run:
- ctest -j2 --output-on-failure -C $BUILD_TYPE
- ! ctest --verbose -C $BUILD_TYPE | grep HDF5-DIAG


- name: Examples
Expand Down Expand Up @@ -156,7 +160,9 @@ jobs:
- name: Test
working-directory: ${{github.workspace}}/build
run: ctest -j2 --output-on-failure -C $BUILD_TYPE
run:
- ctest -j2 --output-on-failure -C $BUILD_TYPE
- ! ctest --verbose -C $BUILD_TYPE | grep HDF5-DIAG

- name: Examples
working-directory: ${{github.workspace}}/build/src/examples
Expand Down Expand Up @@ -199,7 +205,9 @@ jobs:
- name: Test
working-directory: ${{github.workspace}}/build
run: ctest -j2 --output-on-failure -C $BUILD_TYPE
run:
- ctest -j2 --output-on-failure -C $BUILD_TYPE
- ! ctest --verbose -C $BUILD_TYPE | grep HDF5-DIAG

- name: Examples
working-directory: ${{github.workspace}}/build/src/examples
Expand Down Expand Up @@ -295,7 +303,9 @@ jobs:
- name: Test
working-directory: ${{github.workspace}}/build
run: ctest -j2 --output-on-failure -C $BUILD_TYPE
run:
- ctest -j2 --output-on-failure -C $BUILD_TYPE
- ! ctest --verbose -C $BUILD_TYPE | grep HDF5-DIAG

- name: Examples
working-directory: ${{github.workspace}}/build/src/examples
Expand Down Expand Up @@ -348,4 +358,6 @@ jobs:
- name: Test
working-directory: ${{github.workspace}}/build
shell: bash -l {0}
run: ctest -j2 --output-on-failure -C $BUILD_TYPE
run:
- ctest -j2 --output-on-failure -C $BUILD_TYPE
- ! ctest --verbose -C $BUILD_TYPE | grep HDF5-DIAG
2 changes: 1 addition & 1 deletion include/highfive/H5DataType.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class DataType: public Object {
/// \brief Returns the length (in bytes) of this type elements
///
/// Notice that the size of variable length sequences may have limited applicability
/// given that it refers to the size of the control structure. For info see
/// given that it refers to the size of the control structure. For info see
/// https://support.hdfgroup.org/HDF5/doc/RM/RM_H5T.html#Datatype-GetSize
size_t getSize() const;

Expand Down

0 comments on commit 0508f95

Please sign in to comment.