summaryrefslogtreecommitdiffstats
path: root/test/fillval.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/fillval.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/fillval.c')
-rw-r--r--test/fillval.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/test/fillval.c b/test/fillval.c
index 2f58380..25c8bd1 100644
--- a/test/fillval.c
+++ b/test/fillval.c
@@ -1974,19 +1974,10 @@ test_compatible(void)
hsize_t dims[2], one[2]={1,1};
hsize_t hs_offset[2]={3,4};
H5D_fill_value_t status;
- char *srcdir = getenv("srcdir"); /*where the src code is located*/
- char testfile[512]=""; /* test file name */
+ const char *testfile = H5_get_srcdir_filename(FILE_COMPATIBLE); /* Corrected test file name */
TESTING("contiguous dataset compatibility with v. 1.4");
- /* Generate correct name for test file by prepending the source path */
- if(srcdir && ((strlen(srcdir) + strlen(FILE_COMPATIBLE) + 1) <
- sizeof(testfile))) {
- HDstrcpy(testfile, srcdir);
- HDstrcat(testfile, "/");
- }
- HDstrcat(testfile, FILE_COMPATIBLE);
-
if((file = H5Fopen(testfile, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0) {
printf(" Could not open file %s. Try set $srcdir to point at the "
"source directory of test\n", testfile);