[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:
This commit is contained in:
Pedro Vicente Nunes 2004-03-04 11:55:07 -05:00
parent 931efcb5eb
commit 2a93f99317
3 changed files with 23 additions and 30 deletions

View File

@ -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
}

View File

@ -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
*

View File

@ -141,21 +141,6 @@ int make_filters(hid_t loc_id)
if (make_dset(loc_id,"dset_shuffle",sid,dcpl,buf)<0)
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
*-------------------------------------------------------------------------