mirror of
https://github.com/HDFGroup/hdf5.git
synced 2024-11-27 02:10:55 +08:00
[svn-r12520] bug fix
added a call to h5tools_close tested: linux
This commit is contained in:
parent
beb04ae817
commit
26303bfdb5
@ -19,6 +19,10 @@
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#if 0
|
||||
#define H5COPY_DEBUG
|
||||
#endif
|
||||
|
||||
const char *progname="h5copy";
|
||||
int d_status;
|
||||
|
||||
@ -153,6 +157,9 @@ main (int argc, const char *argv[])
|
||||
int verbose=0;
|
||||
hid_t pid;
|
||||
char str_flag[20];
|
||||
|
||||
/* initialize h5tools lib */
|
||||
h5tools_init();
|
||||
|
||||
/* switches come before non-switch arguments */
|
||||
for (argno=1; argno<argc && '-'==argv[argno][0]; argno++)
|
||||
@ -209,6 +216,9 @@ main (int argc, const char *argv[])
|
||||
|
||||
while (fname_src && *fname_src)
|
||||
{
|
||||
#ifdef H5COPY_DEBUG
|
||||
printf("%s\n",fname_src);
|
||||
#endif
|
||||
fid_src = h5tools_fopen(fname_src, NULL, NULL, 0, argc, argv);
|
||||
|
||||
if (fid_src>=0)
|
||||
@ -240,7 +250,7 @@ main (int argc, const char *argv[])
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* last argument, same logic, but the file does not exist, so we attempt to
|
||||
* last argument, same logic, but the file might not exist, so we attempt to
|
||||
* create one instead
|
||||
*-------------------------------------------------------------------------*/
|
||||
|
||||
@ -341,6 +351,8 @@ main (int argc, const char *argv[])
|
||||
free(fname_src);
|
||||
if (fname_dst)
|
||||
free(fname_dst);
|
||||
|
||||
h5tools_close();
|
||||
|
||||
|
||||
return 0;
|
||||
@ -356,6 +368,8 @@ error:
|
||||
free(fname_src);
|
||||
if (fname_dst)
|
||||
free(fname_dst);
|
||||
|
||||
h5tools_close();
|
||||
|
||||
|
||||
return 1;
|
||||
|
@ -45,8 +45,12 @@ TOOLTEST() {
|
||||
|
||||
TESTING $H5COPY $@
|
||||
(
|
||||
cd $srcdir/../testfiles
|
||||
$RUNSERIAL $H5COPY_BIN $@
|
||||
echo "#############################"
|
||||
echo " output for '$H5COPY $@'"
|
||||
echo "#############################"
|
||||
cd $srcdir/../testfiles
|
||||
# echo " pwd = `pwd`"
|
||||
$RUNSERIAL $H5COPY_BIN $@
|
||||
) > output.out
|
||||
RET=$?
|
||||
if [ $RET != 0 ] ; then
|
||||
@ -65,8 +69,8 @@ TOOLTEST() {
|
||||
#TOOLTEST -v test1.h5/integer test1.out.h5/integer_copy
|
||||
#TOOLTEST -v test1.h5/g1 test1.out.h5/g1
|
||||
|
||||
#if test $nerrors -eq 0 ; then
|
||||
# echo "All h5copy tests passed."
|
||||
#fi
|
||||
if test $nerrors -eq 0 ; then
|
||||
echo "All h5copy tests passed."
|
||||
fi
|
||||
|
||||
exit $nerrors
|
||||
|
Loading…
Reference in New Issue
Block a user