diff options
author | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2013-03-25 15:25:22 (GMT) |
---|---|---|
committer | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2013-03-25 15:25:22 (GMT) |
commit | dbdedfdd2e5812b3c1d97e2f1f7361684db2d8e4 (patch) | |
tree | 963a5b4952cbb88253df8850d1cc19d70b6f614c /hl/test | |
parent | ebb80dbae183e75ccf90f899f3ee1491946f93ec (diff) | |
parent | 6e1122dda4e446f6e9ad9ce4a9c2da8d40e441e3 (diff) | |
download | hdf5-dbdedfdd2e5812b3c1d97e2f1f7361684db2d8e4.zip hdf5-dbdedfdd2e5812b3c1d97e2f1f7361684db2d8e4.tar.gz hdf5-dbdedfdd2e5812b3c1d97e2f1f7361684db2d8e4.tar.bz2 |
[svn-r23443] merged from trunk
Diffstat (limited to 'hl/test')
-rw-r--r-- | hl/test/CMakeLists.txt | 7 | ||||
-rw-r--r-- | hl/test/Makefile.in | 2 | ||||
-rw-r--r-- | hl/test/test_ds.c | 8 |
3 files changed, 12 insertions, 5 deletions
diff --git a/hl/test/CMakeLists.txt b/hl/test/CMakeLists.txt index 39a3811..c5b6f6e 100644 --- a/hl/test/CMakeLists.txt +++ b/hl/test/CMakeLists.txt @@ -31,6 +31,9 @@ MACRO (HL_ADD_TEST hl_name files) SET_TARGET_PROPERTIES (hl_${hl_name} PROPERTIES FOLDER test/hl) ADD_TEST (NAME hl_${hl_name} COMMAND $<TARGET_FILE:hl_${hl_name}>) + IF (NOT "${last_test}" STREQUAL "") + SET_TESTS_PROPERTIES (hl_${hl_name} PROPERTIES DEPENDS ${last_test}) + ENDIF (NOT "${last_test}" STREQUAL "") # -------------------------------------------------------------------- #-- Copy the necessary files. @@ -75,6 +78,10 @@ ADD_TEST ( test_packet_table.h5 test_table.h5 ) +IF (NOT "${last_test}" STREQUAL "") + SET_TESTS_PROPERTIES (hl_test-clear-objects PROPERTIES DEPENDS ${last_test}) +ENDIF (NOT "${last_test}" STREQUAL "") +SET (last_test "hl_test-clear-objects") HL_ADD_TEST (test_ds "dsdata.txt;dslat.txt;dslon.txt;test_ds_be.h5;test_ds_le.h5") HL_ADD_TEST (test_dset_opt "") diff --git a/hl/test/Makefile.in b/hl/test/Makefile.in index d8c5614..812aad6 100644 --- a/hl/test/Makefile.in +++ b/hl/test/Makefile.in @@ -259,6 +259,7 @@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ HAVE_FORTRAN_2003 = @HAVE_FORTRAN_2003@ +HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ HDF_CXX = @HDF_CXX@ @@ -310,7 +311,6 @@ PACKAGE_VERSION = @PACKAGE_VERSION@ PARALLEL = @PARALLEL@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ -PTHREAD = @PTHREAD@ RANLIB = @RANLIB@ ROOT = @ROOT@ RUNPARALLEL = @RUNPARALLEL@ diff --git a/hl/test/test_ds.c b/hl/test/test_ds.c index e290bbb..b81f8d4 100644 --- a/hl/test/test_ds.c +++ b/hl/test/test_ds.c @@ -1127,9 +1127,9 @@ herr_t test_cmp_scalename(hid_t fid, hid_t did, const char *name, const char *sc if((dsid = H5Dopen2(fid, name, H5P_DEFAULT)) >= 0) { if(H5DSis_attached(did, dsid, idx) == 1) { if((name_len=H5DSget_scale_name(dsid,NULL,(size_t)0)) > 0) { - name_out = (char*)HDmalloc(name_len * sizeof (char)); + name_out = (char*)HDmalloc((name_len+1) * sizeof (char)); if(name_out != NULL) { - if(H5DSget_scale_name(dsid, name_out, (size_t)name_len) >= 0) { + if(H5DSget_scale_name(dsid, name_out, (size_t)name_len+1) >= 0) { if(HDstrcmp(scalename,name_out)==0) { ret_value = SUCCEED; } @@ -3232,12 +3232,12 @@ static int test_simple(void) goto out; /* allocate a buffer */ - name_out = (char*)HDmalloc(name_len * sizeof (char)); + name_out = (char*)HDmalloc((name_len+1) * sizeof (char)); if(name_out == NULL) goto out; /* get the scale name using this buffer */ - if(H5DSget_scale_name(dsid, name_out, (size_t)name_len) < 0) + if(H5DSget_scale_name(dsid, name_out, (size_t)name_len+1) < 0) goto out; if(HDstrcmp("Latitude set 0",name_out)!=0) |