summaryrefslogtreecommitdiffstats
path: root/test/h5test.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2010-03-17 21:38:20 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2010-03-17 21:38:20 (GMT)
commitfd547cd11ffa59c66aa93a5c55f6b979792e76d7 (patch)
treefcca518af22b90099a766da4419e593d373cd390 /test/h5test.c
parent8a14f5dc0ecf2a550916d5fd8ff5804d6e641240 (diff)
downloadhdf5-fd547cd11ffa59c66aa93a5c55f6b979792e76d7.zip
hdf5-fd547cd11ffa59c66aa93a5c55f6b979792e76d7.tar.gz
hdf5-fd547cd11ffa59c66aa93a5c55f6b979792e76d7.tar.bz2
[svn-r18413] Description:
Unify srcdir handling for test executables and allow them to use the srcdir setting from configure time without requiring the 'srcdir' environment variable be set (although you still can, to override the built in setting). Attempted to get this right for Windows builds also. Also add dependency between src/H5Tinit.c and src/libhdf5.settings, so that the test/testcheck_version.sh script works correctly. Tested on: Linux/32 2.6 (jam) Mac OS X/32 10.6.2 (amazon)
Diffstat (limited to 'test/h5test.c')
-rw-r--r--test/h5test.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/test/h5test.c b/test/h5test.c
index b9f3221..8e439cd 100644
--- a/test/h5test.c
+++ b/test/h5test.c
@@ -1114,18 +1114,10 @@ getenv_all(MPI_Comm comm, int root, const char* name)
hid_t
h5_make_local_copy(char *origfilename, char *local_copy_name)
{
- char filename[FILENAME_BUF_SIZE] = "";
+ const char *filename = H5_get_srcdir_filename(origfilename); /* Corrected test file name */
int fd_old = (-1), fd_new = (-1); /* File descriptors for copying data */
ssize_t nread; /* Number of bytes read in */
char buf[READ_BUF_SIZE]; /* Buffer for copying data */
- char * srcdir = HDgetenv("srcdir"); /* The source directory */
-
- if(srcdir && ((HDstrlen(srcdir) +
- HDstrlen(origfilename) + 6) < FILENAME_BUF_SIZE)) {
- HDstrcpy(filename, srcdir);
- HDstrcat(filename, "/");
- }
- HDstrcat(filename, origfilename);
/* Copy old file into temporary file */
if((fd_old = HDopen(filename, O_RDONLY, 0666)) < 0) return -1;