summaryrefslogtreecommitdiffstats
path: root/tools/h5copy
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2007-02-14 13:54:11 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2007-02-14 13:54:11 (GMT)
commitbb392083b2a81aa942678e06a537a3c0ab5c08aa (patch)
tree9243c5965897315e4cbeef983f71b224498718c0 /tools/h5copy
parentdf075c5b9266b3b7a038fb1377d130ed315aa15c (diff)
downloadhdf5-bb392083b2a81aa942678e06a537a3c0ab5c08aa.zip
hdf5-bb392083b2a81aa942678e06a537a3c0ab5c08aa.tar.gz
hdf5-bb392083b2a81aa942678e06a537a3c0ab5c08aa.tar.bz2
[svn-r13297] Description:
Add small 'h5mkgrp' tool to create groups in an HDF5 file from the command line, allowing the group structure for a file to be created in a script. This tool closely follows the 'mkdir' command line tool in UNIX/Linux. Allow tool library applications to pass a FAPL to the h5tool_fopen() call, giving some additional flexibility to tools which are adding objects to an existing HDF5 file (like h5copy & h5mkgrp). Fix missing files in MANIFEST from previous checkin(s). Tested on: Linux/32 2.6 (chicago) Linux/64 2.6 (chicago2)
Diffstat (limited to 'tools/h5copy')
-rw-r--r--tools/h5copy/h5copy.c6
-rw-r--r--tools/h5copy/testh5copy.sh11
2 files changed, 8 insertions, 9 deletions
diff --git a/tools/h5copy/h5copy.c b/tools/h5copy/h5copy.c
index 9b4f629..926be0f 100644
--- a/tools/h5copy/h5copy.c
+++ b/tools/h5copy/h5copy.c
@@ -272,7 +272,7 @@ main (int argc, const char *argv[])
* open input file
*-------------------------------------------------------------------------*/
- fid_src = h5tools_fopen(fname_src, H5F_ACC_RDONLY, NULL, NULL, 0);
+ fid_src = h5tools_fopen(fname_src, H5F_ACC_RDONLY, H5P_DEFAULT, NULL, NULL, 0);
/*-------------------------------------------------------------------------
* test for error in opening input file
@@ -290,10 +290,10 @@ main (int argc, const char *argv[])
*-------------------------------------------------------------------------*/
/* Attempt to open an existing HDF5 file first */
- fid_dst = h5tools_fopen(fname_dst, H5F_ACC_RDWR, NULL, NULL, 0);
+ fid_dst = h5tools_fopen(fname_dst, H5F_ACC_RDWR, H5P_DEFAULT, NULL, NULL, 0);
/* If we couldn't open an existing file, try creating file */
- /* (use "EXCL" instead of "TRUNC", so we don't blow away existing non-HDF5 file */
+ /* (use "EXCL" instead of "TRUNC", so we don't blow away existing non-HDF5 file) */
if(fid_dst < 0)
fid_dst = H5Fcreate(fname_dst, H5F_ACC_EXCL, H5P_DEFAULT, H5P_DEFAULT);
diff --git a/tools/h5copy/testh5copy.sh b/tools/h5copy/testh5copy.sh
index a905148..4106fe0 100644
--- a/tools/h5copy/testh5copy.sh
+++ b/tools/h5copy/testh5copy.sh
@@ -63,7 +63,7 @@ VERIFY()
VERIFY_H5LS()
{
SPACES=" "
- echo "Verifying h5diff file structure $* $SPACES" | cut -c1-70 | tr -d '\012'
+ echo "Verifying h5ls file structure $* $SPACES" | cut -c1-70 | tr -d '\012'
}
# Run a test and print PASS or *FAIL*. If h5copy can complete
@@ -137,17 +137,16 @@ H5LSTEST()
{
expect="$srcdir/../testfiles/`basename $1 .h5`.ls"
actual="../testfiles/`basename $1 .h5`.out"
- actual_err="../testfiles/`basename $1 .h5`.err"
+ # Stderr is included in stdout so that the diff can detect
+ # any unexpected output from that stream too.
VERIFY_H5LS $@
-
- (
+ (
echo "#############################"
echo "Expected output for '$H5LS $@'"
echo "#############################"
$RUNSERIAL $H5LS_BIN $H5LS_ARGS $@
- ) >$actual 2>$actual_err
- cat $actual_err >> $actual
+ ) 2>&1 >$actual
if [ ! -f $expect ]; then