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/th5s.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/th5s.c')
-rw-r--r-- | test/th5s.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/test/th5s.c b/test/th5s.c index a38e384..d999920 100644 --- a/test/th5s.c +++ b/test/th5s.c @@ -173,13 +173,8 @@ test_h5s_basic(void) * the instructions in space_overflow.c for regenerating the th5s.h5 file. */ { - char testfile[512]=""; - char *srcdir = HDgetenv("srcdir"); - if (srcdir && ((HDstrlen(srcdir) + HDstrlen(TESTFILE) + 1) < sizeof(testfile))){ - HDstrcpy(testfile, srcdir); - HDstrcat(testfile, "/"); - } - HDstrcat(testfile, TESTFILE); + const char *testfile = H5_get_srcdir_filename(TESTFILE); /* Corrected test file name */ + fid1 = H5Fopen(testfile, H5F_ACC_RDONLY, H5P_DEFAULT); CHECK_I(fid1, "H5Fopen"); if (fid1 >= 0){ |