summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorPedro Vicente Nunes <pvn@hdfgroup.org>2004-03-04 16:55:07 (GMT)
committerPedro Vicente Nunes <pvn@hdfgroup.org>2004-03-04 16:55:07 (GMT)
commit2a93f993174ed44a85a2d8fca7b3c68e5bb41389 (patch)
treee01e6c3fed50707030b1051ea6f83e6e89b39ec7 /tools
parent931efcb5ebd4099d18d93e7dcdaf296ea4991d73 (diff)
downloadhdf5-2a93f993174ed44a85a2d8fca7b3c68e5bb41389.zip
hdf5-2a93f993174ed44a85a2d8fca7b3c68e5bb41389.tar.gz
hdf5-2a93f993174ed44a85a2d8fca7b3c68e5bb41389.tar.bz2
[svn-r8232] Purpose:
new feature Description: added a check for the return value of the tools h5repack and h5diff in the run script. the return value is used to print PASSED (tool returns 0) or FAILED Solution: Platforms tested: linux Misc. update:
Diffstat (limited to 'tools')
-rw-r--r--tools/h5repack/h5repack.sh17
-rw-r--r--tools/h5repack/h5repack_main.c21
-rw-r--r--tools/h5repack/testh5repack_filters.c15
3 files changed, 23 insertions, 30 deletions
diff --git a/tools/h5repack/h5repack.sh b/tools/h5repack/h5repack.sh
index 8b8f44a..2b8168d 100644
--- a/tools/h5repack/h5repack.sh
+++ b/tools/h5repack/h5repack.sh
@@ -64,7 +64,13 @@ TOOLTEST()
$RUNSERIAL $H5REPACK_BIN "$@"
fi
)
-echo " PASSED"
+ RET=$?
+ if [ $RET != 0 ] ; then
+ echo "*FAILED*"
+ else
+ echo " PASSED"
+ fi
+
}
# Call the h5diff tool
@@ -80,7 +86,14 @@ DIFFTEST()
$RUNSERIAL $H5DIFF_BIN "$@"
fi
)
- echo " PASSED"
+ RET=$?
+# echo $RET
+ if [ $RET != 0 ] ; then
+ echo "*FAILED*"
+ else
+ echo " PASSED"
+ fi
+
}
diff --git a/tools/h5repack/h5repack_main.c b/tools/h5repack/h5repack_main.c
index 71308d9..05a9c1e 100644
--- a/tools/h5repack/h5repack_main.c
+++ b/tools/h5repack/h5repack_main.c
@@ -15,24 +15,22 @@
#include <stdlib.h>
#include "h5repack.h"
-
-
static void usage(void);
-
/*
+h5repack main program
+
Examples of use:
-v -i file1.h5 -o file2.h5 -f "dataset:GZIP 6" -l "dataset:CHUNK 2x2"
-v -i file1.h5 -o file2.h5 -f "GZIP 6"
*/
-
int main(int argc, char **argv)
{
char *infile = NULL;
char *outfile = NULL;
pack_opt_t options; /*the global options */
- int i;
+ int i, ret;
/* initialize options */
h5repack_init (&options,0);
@@ -87,20 +85,17 @@ int main(int argc, char **argv)
usage();
/* pack it */
- h5repack(infile,outfile,&options);
-
-#if defined(H5_REPACK_DEBUG)
- if (h5repack_verify(outfile,&options)<=0)
- printf("Warning: Output file does not have some of the requested filters\n");
-#endif
+ ret=h5repack(infile,outfile,&options);
/* free tables */
h5repack_end(&options);
- return 0;
+ if (ret==-1)
+ return 1;
+ else
+ return 0;
}
-
/*-------------------------------------------------------------------------
* Function: usage
*
diff --git a/tools/h5repack/testh5repack_filters.c b/tools/h5repack/testh5repack_filters.c
index 7a2265c..f8efa74 100644
--- a/tools/h5repack/testh5repack_filters.c
+++ b/tools/h5repack/testh5repack_filters.c
@@ -142,21 +142,6 @@ int make_filters(hid_t loc_id)
goto out;
/*-------------------------------------------------------------------------
- * checksum
- *-------------------------------------------------------------------------
- */
-#if 0
- /* remove the filters from the dcpl */
- if (H5Premove_filter(dcpl,H5Z_FILTER_ALL)<0)
- goto out;
- /* set the checksum filter */
- if (H5Pset_fletcher32(dcpl)<0)
- goto out;
- if (make_dset(loc_id,"dset_fletcher32",sid,dcpl,buf)<0)
- goto out;
-#endif
-
-/*-------------------------------------------------------------------------
* shuffle + SZIP
*-------------------------------------------------------------------------
*/