summaryrefslogtreecommitdiffstats
path: root/test/ohdr.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/ohdr.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/ohdr.c')
-rw-r--r--test/ohdr.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/test/ohdr.c b/test/ohdr.c
index c3b8f8b..69b61ea 100644
--- a/test/ohdr.c
+++ b/test/ohdr.c
@@ -362,20 +362,7 @@ main(void)
HDputs("Accessing objects with unknown header messages:");
{
hid_t file2; /* File ID for 'bogus' object file */
- char testpath[512] = "";
- char testfile[512] = "";
- char *srcdir = HDgetenv("srcdir");
-
- /* Build path to all test files */
- if(srcdir && ((HDstrlen(srcdir) + 2) < sizeof(testpath))) {
- HDstrcpy(testpath, srcdir);
- HDstrcat(testpath, "/");
- } /* end if */
-
- /* Build path to test file */
- if(srcdir && ((HDstrlen(testpath) + HDstrlen(FILE_BOGUS) + 1) < sizeof(testfile)))
- HDstrcpy(testfile, testpath);
- HDstrcat(testfile, FILE_BOGUS);
+ const char *testfile = H5_get_srcdir_filename(FILE_BOGUS);
TESTING("object with unknown header message and no flags set");