diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/h5repack/Makefile.am | 2 | ||||
-rw-r--r-- | tools/h5repack/Makefile.in | 2 | ||||
-rw-r--r-- | tools/h5repack/h5repacktst.c | 23 |
3 files changed, 16 insertions, 11 deletions
diff --git a/tools/h5repack/Makefile.am b/tools/h5repack/Makefile.am index 4f24735..a0fcdcc 100644 --- a/tools/h5repack/Makefile.am +++ b/tools/h5repack/Makefile.am @@ -52,7 +52,7 @@ testh5repack_detect_szip_SOURCES=testh5repack_detect_szip.c # Temporary files. *.h5 are generated by h5repack. They should # copied to the testfiles/ directory if update is required. -CHECK_CLEANFILES+=*.h5 +CHECK_CLEANFILES+=*.h5 *.bin DISTCLEANFILES=h5repack.sh include $(top_srcdir)/config/conclude.am diff --git a/tools/h5repack/Makefile.in b/tools/h5repack/Makefile.in index a7cc99a..a6d37d9 100644 --- a/tools/h5repack/Makefile.in +++ b/tools/h5repack/Makefile.in @@ -330,7 +330,7 @@ TRACE = perl $(top_srcdir)/bin/trace # Temporary files. *.h5 are generated by h5repack. They should # copied to the testfiles/ directory if update is required. -CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.h5 +CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.h5 *.bin # Include src, test, and tools/lib directories INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/test -I$(top_srcdir)/tools/lib diff --git a/tools/h5repack/h5repacktst.c b/tools/h5repack/h5repacktst.c index 6d1feaf..6d1888c 100644 --- a/tools/h5repack/h5repacktst.c +++ b/tools/h5repack/h5repacktst.c @@ -74,6 +74,9 @@ const char *H5REPACK_FILENAMES[] = { NULL }; +#define H5REPACK_EXTFILE "h5repack_ext.bin" + + const char *progname = "h5repacktst"; int d_status = EXIT_SUCCESS; @@ -136,7 +139,6 @@ int main (void) #if defined (H5_HAVE_FILTER_SZIP) int szip_can_encode = 0; #endif - hid_t fapl; /* initialize */ memset(&diff_options, 0, sizeof (diff_opt_t)); @@ -145,10 +147,6 @@ int main (void) /* run tests */ puts("Testing h5repack:"); - /* setup */ - h5_reset(); - fapl = h5_fileaccess(); - /* make the test files */ TESTING(" generating datasets"); if (make_testfiles()<0) @@ -1305,14 +1303,21 @@ if (szip_can_encode) { /*------------------------------------------------------------------------- - * end + * clean temporary test files *------------------------------------------------------------------------- */ + { + hid_t fapl; + + /* setup */ + h5_reset(); + fapl = h5_fileaccess(); + h5_cleanup(H5REPACK_FILENAMES, fapl); + + } puts("All h5repack tests passed."); - h5_cleanup(H5REPACK_FILENAMES, fapl); - return 0; error: @@ -2695,7 +2700,7 @@ int make_external(hid_t loc_id) /* create */ if ((dcpl = H5Pcreate(H5P_DATASET_CREATE))<0) goto out; - if (H5Pset_external(dcpl, "h5repack_ext.bin", (off_t)0, size)<0) + if (H5Pset_external(dcpl, H5REPACK_EXTFILE, (off_t)0, size)<0) goto out; if ((sid = H5Screate_simple(1,cur_size, max_size))<0) goto out; |