summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorLarry Knox <lrknox@hdfgroup.org>2016-03-15 18:42:26 (GMT)
committerLarry Knox <lrknox@hdfgroup.org>2016-03-15 18:42:26 (GMT)
commit45a459a786505b74186b3ff7630abc99228e329f (patch)
tree7daf4d97b622b03dcfc9f7a3aded7954002ca49a /test
parent3590175e4a222da09064206a7492ef6ccc7432c4 (diff)
downloadhdf5-45a459a786505b74186b3ff7630abc99228e329f.zip
hdf5-45a459a786505b74186b3ff7630abc99228e329f.tar.gz
hdf5-45a459a786505b74186b3ff7630abc99228e329f.tar.bz2
[svn-r29425] Ohdr test now writes to tbogus.h5 which is in the HDF5 source code. Make a local copy of the tbogus.h5 file to avoid writing to source files from a separate build directory (See HDFFV-9713).
Diffstat (limited to 'test')
-rw-r--r--test/ohdr.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/test/ohdr.c b/test/ohdr.c
index 6f33878..0da6181 100644
--- a/test/ohdr.c
+++ b/test/ohdr.c
@@ -19,7 +19,6 @@
#include "h5test.h"
#include "H5srcdir.h"
#include "H5Iprivate.h"
-
/*
* This file needs to access private datatypes from the H5O package.
* This file also needs to access the object header testing code.
@@ -471,7 +470,18 @@ test_unknown(unsigned bogus_id, char *filename, hid_t fapl)
hid_t fid_bogus = -1; /* bogus file ID */
hid_t gid_bogus = -1; /* bogus group ID */
hid_t loc_bogus = -1; /* location: bogus file or group ID */
- const char *testfile = H5_get_srcdir_filename(FILE_BOGUS);
+ char testfile[256];
+
+ /* create a different name for a local copy of the data file to be
+ opened with rd/wr file permissions in case build and test are
+ done in the source directory. */
+ HDstrncpy(testfile, FILE_BOGUS, strlen(FILE_BOGUS));
+ testfile[strlen(FILE_BOGUS)]='\0';
+ HDstrncat(testfile, ".copy", 5);
+
+ /* Make a copy of the data file from svn. */
+ if(h5_make_local_copy(FILE_BOGUS, testfile) < 0)
+ FAIL_STACK_ERROR
TESTING("object with unknown header message and no flags set");