diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2010-03-17 21:38:20 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2010-03-17 21:38:20 (GMT) |
commit | fd547cd11ffa59c66aa93a5c55f6b979792e76d7 (patch) | |
tree | fcca518af22b90099a766da4419e593d373cd390 /test/tfile.c | |
parent | 8a14f5dc0ecf2a550916d5fd8ff5804d6e641240 (diff) | |
download | hdf5-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/tfile.c')
-rw-r--r-- | test/tfile.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/test/tfile.c b/test/tfile.c index 1d5cc0e..a981720 100644 --- a/test/tfile.c +++ b/test/tfile.c @@ -2957,7 +2957,6 @@ test_filespace_compatible(void) int rdbuf[100]; /* Temporary buffer for reading in dataset data */ uint8_t buf[READ_OLD_BUFSIZE]; /* temporary buffer for reading */ ssize_t nread; /* Number of bytes read in */ - char *srcdir = HDgetenv("srcdir"); /* where the src code is located */ unsigned i, j; /* Local index variable */ hssize_t free_space; /* Amount of free space in the file */ hsize_t threshold; /* Free space section threshold */ @@ -2968,14 +2967,7 @@ test_filespace_compatible(void) MESSAGE(5, ("Testing File space compatibility for 1.6 and 1.8 files\n")); for(j = 0; j < NELMTS(OLD_FILENAME); j++) { - char filename[FILENAME_LEN] = ""; /* old test file name */ - - /* Generate correct name for test file by prepending the source path */ - if(srcdir && ((HDstrlen(srcdir) + HDstrlen(OLD_FILENAME[j]) + 1) < sizeof(filename))) { - HDstrcpy(filename, srcdir); - HDstrcat(filename, "/"); - } - HDstrcat(filename, OLD_FILENAME[j]); + const char *filename = H5_get_srcdir_filename(OLD_FILENAME[j]); /* Corrected test file name */ /* Copy old file into test file */ fd_old = HDopen(filename, O_RDONLY, 0666); |