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/external.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/external.c')
-rw-r--r-- | test/external.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/test/external.c b/test/external.c index 68f81e8..24cd85b 100644 --- a/test/external.c +++ b/test/external.c @@ -845,8 +845,7 @@ test_4 (hid_t fapl) hid_t xid = -1; hid_t xid2 = -1; char filename[1024]; /*file name */ - char pathname[1024]; - char *srcdir = getenv("srcdir"); /*where the src code is located*/ + const char *pathname = H5_get_srcdir_filename(LINKED_FILE); /* Corrected test file name */ TESTING("opening external link twice"); @@ -865,14 +864,6 @@ test_4 (hid_t fapl) if((gid = H5Gopen2(fid, "/", H5P_DEFAULT)) < 0) goto error; - pathname[0] = '\0'; - /* Generate correct name for test file by prepending the source path */ - if(srcdir && ((HDstrlen(srcdir) + HDstrlen(LINKED_FILE) + 1) < sizeof(pathname))) { - HDstrcpy(pathname, srcdir); - HDstrcat(pathname, "/"); - } - HDstrcat(pathname, LINKED_FILE); - /* Create an external link to an existing file*/ if(H5Lcreate_external(pathname, "/group", gid, " link", H5P_DEFAULT, H5P_DEFAULT) < 0) goto error; |