Skip to content

Bring h5diffgentest in line with expected test files #5456

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion tools/test/h5diff/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ if (HDF5_BUILD_GENERATORS)
clang_format (HDF5_TOOLS_TEST_H5DIFF_FORMAT h5diffgentest)
endif ()

#add_test (NAME h5diffgentest COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5diffgentest>)
#add_test (NAME h5diffgentest COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5diffgentest> WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/testfiles)

# if (H5_HAVE_PARALLEL)
# add_test (NAME h5diffgentest-par COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5diffgentest> WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/PAR/testfiles)
# endif ()
endif ()

#-----------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion tools/test/h5diff/CMakeTests.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -769,7 +769,7 @@ ADD_H5_TEST (h5diff_51 1 -v ${FILE4} ${FILE4} dset1a dset1b)
ADD_H5_TEST (h5diff_52 1 -v ${FILE4} ${FILE4} dset2a dset2b)

# 5.3
ADD_H5_TEST (h5diff_53 1 -v ${FILE4} ${FILE4} dset3a dset4b)
ADD_H5_TEST (h5diff_53 1 -v ${FILE4} ${FILE4} dset3a dset3b)

# 5.4
ADD_H5_TEST (h5diff_54 1 -v ${FILE4} ${FILE4} dset4a dset4b)
Expand Down
4 changes: 2 additions & 2 deletions tools/test/h5diff/expected/h5diff_53.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dataset: </dset3a> and </dset4b>
dataset: </dset3a> and </dset3b>
size: [3x2] [3x2]
position dset3a dset4b difference
position dset3a dset3b difference
------------------------------------------------------------
[ 1 0 ] 1 3 2
[ 1 1 ] 1 4 3
Expand Down
50 changes: 49 additions & 1 deletion tools/test/h5diff/expected/h5diff_540.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,54 @@ position attr1 of </> attr1 of </> difference
[ 1 ] 10 15 5
[ 1 ] 10.5 15.5 5
8 differences found
attribute: <attr2 of </>> and <attr2 of </>>
size: [2] [2]
position attr2 of </> attr2 of </> difference
------------------------------------------------------------
[ 0 ] 0 5 5
[ 0 ] 0 5 5
[ 1 ] 10 15 5
[ 1 ] 10.5 15.5 5
[ 1 ] 10 15 5
[ 1 ] 10.5 15.5 5
6 differences found
attribute: <attr3 of </>> and <attr3 of </>>
size: [2] [2]
position attr3 of </> attr3 of </> difference
------------------------------------------------------------
[ 0 ] 0 5 5
[ 0 ] 0 5 5
[ 0 ] 10 15 5
[ 0 ] 10.5 15.5 5
[ 0 ] 10 15 5
[ 0 ] 10.5 15.5 5
[ 1 ] 0 5 5
[ 1 ] 0 5 5
[ 1 ] 10 15 5
[ 1 ] 10.5 15.5 5
[ 1 ] 10 15 5
[ 1 ] 10.5 15.5 5
12 differences found
attribute: <attr4 of </>> and <attr4 of </>>
size: [2] [2]
position attr4 of </> attr4 of </> difference
------------------------------------------------------------
[ 0 ] 0 5 5
[ 0 ] 0 5 5
[ 0 ] 0 5 5
[ 0 ] 10 15 5
[ 0 ] 10.5 15.5 5
[ 1 ] 10 15 5
[ 1 ] 0 5 5
[ 1 ] 0 5 5
[ 1 ] 10 15 5
[ 1 ] 10.5 15.5 5
[ 1 ] 10 15 5
[ 1 ] 0 5 5
[ 1 ] 0 5 5
[ 1 ] 10 15 5
[ 1 ] 10.5 15.5 5
15 differences found
dataset: </dset1> and </dset1>
size: [2] [2]
position dset1 dset1 difference
Expand Down Expand Up @@ -83,4 +131,4 @@ position dset4 dset4 difference
[ 1 ] 10 15 5
[ 1 ] 10.5 15.5 5
15 differences found
EXIT CODE: 1
EXIT CODE: 1
11 changes: 5 additions & 6 deletions tools/test/h5diff/h5diffgentest.c
Original file line number Diff line number Diff line change
Expand Up @@ -3020,7 +3020,6 @@ test_group_recurse(const char *fname1, const char *fname2)
int data2[4][2] = {{0, 2}, {0, 2}, {2, 0}, {2, 0}};
int data3[4][2] = {{0, 3}, {0, 3}, {3, 0}, {3, 0}};
herr_t status = SUCCEED;

/*-----------------------------------------------------------------------
* Create file(s)
*------------------------------------------------------------------------*/
Expand Down Expand Up @@ -4976,7 +4975,7 @@ test_comps_vlen(const char *fname, const char *dset, const char *attr, int diff,
hid_t fid = H5I_INVALID_HID; /* HDF5 File ID */
hid_t did_dset = H5I_INVALID_HID; /* dataset ID */
hid_t sid_dset = H5I_INVALID_HID; /* dataset space ID */
hid_t tid_attr = H5I_INVALID_HID;
hid_t tid_attr = H5I_INVALID_HID; /* attribute ID */
hid_t tid_cmpd2 = H5I_INVALID_HID; /* compound2 type ID */
hid_t tid_cmpd1 = H5I_INVALID_HID; /* compound1 type ID */
hid_t tid_cmpd1_vlen = H5I_INVALID_HID;
Expand Down Expand Up @@ -5091,7 +5090,7 @@ test_comps_array_vlen(const char *fname, const char *dset, const char *attr, int
hid_t fid = H5I_INVALID_HID; /* HDF5 File IDs */
hid_t did_dset = H5I_INVALID_HID; /* Dataset ID */
hid_t sid_dset = H5I_INVALID_HID; /* Dataspace ID */
hid_t tid_attr = H5I_INVALID_HID;
hid_t tid_attr = H5I_INVALID_HID; /* Attribute ID */
hid_t tid_cmpd1 = H5I_INVALID_HID; /* Compound1 Datatype ID */
hid_t tid_arry1 = H5I_INVALID_HID; /* Array Datatype ID */
hid_t tid_cmpd2 = H5I_INVALID_HID; /* Compound2 Datatype ID */
Expand Down Expand Up @@ -5232,7 +5231,7 @@ test_comps_vlen_arry(const char *fname, const char *dset, const char *attr, int
hid_t fid = H5I_INVALID_HID; /* HDF5 File ID */
hid_t did_dset = H5I_INVALID_HID; /* dataset ID */
hid_t sid_dset = H5I_INVALID_HID; /* dataset space ID */
hid_t tid_attr = H5I_INVALID_HID;
hid_t tid_attr = H5I_INVALID_HID; /* attribute ID */
hid_t tid_cmpd3 = H5I_INVALID_HID; /* compound3 type ID */
hid_t tid_cmpd2 = H5I_INVALID_HID; /* compound2 type ID */
hid_t tid_cmpd2_arry = H5I_INVALID_HID;
Expand Down Expand Up @@ -8821,7 +8820,7 @@ test_double_epsilon(const char *fname1, const char *fname2)
wdata[i][j] = 0.0;

/* dataset */
if (write_dset(fid1, 2, dims1, "dataset", H5T_IEEE_F64LE, wdata) < 0)
if (write_dset(fid1, 2, dims1, "DS1", H5T_IEEE_F64LE, wdata) < 0)
PROGRAM_ERROR;

/*
Expand All @@ -8832,7 +8831,7 @@ test_double_epsilon(const char *fname1, const char *fname2)
wdata[i][j] = (double)1.e-19;

/* dataset */
if (write_dset(fid2, 2, dims1, "dataset", H5T_IEEE_F64LE, wdata) < 0)
if (write_dset(fid2, 2, dims1, "DS1", H5T_IEEE_F64LE, wdata) < 0)
PROGRAM_ERROR;

error:
Expand Down
Binary file modified tools/test/h5diff/testfiles/compounds_array_vlen1.h5
Binary file not shown.
Binary file modified tools/test/h5diff/testfiles/compounds_array_vlen2.h5
Binary file not shown.
Loading