summaryrefslogtreecommitdiffstats
path: root/test/tarray.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/tarray.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/tarray.c')
-rw-r--r--test/tarray.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/test/tarray.c b/test/tarray.c
index 590d48c..83528ff 100644
--- a/test/tarray.c
+++ b/test/tarray.c
@@ -1802,8 +1802,7 @@ test_compat(void)
long l[ARRAY1_DIM1];
double d;
} s3_t;
- char testfile[512]=""; /* Character buffer for corrected test file name */
- char *srcdir = getenv("srcdir"); /* Pointer to the directory the source code is located within */
+ const char *testfile = H5_get_srcdir_filename(TESTFILE); /* Corrected test file name */
hid_t fid1; /* HDF5 File IDs */
hid_t dataset; /* Dataset ID */
hid_t tid1; /* Array Datatype ID */
@@ -1831,12 +1830,6 @@ test_compat(void)
* changed, follow the instructions in gen_old_array.c for regenerating
* the tarrold.h5 file.
*/
- /* Generate the correct name for the test file, by prepending the source path */
- if (srcdir && ((strlen(srcdir) + strlen(TESTFILE) + 1) < sizeof(testfile))) {
- strcpy(testfile, srcdir);
- strcat(testfile, "/");
- }
- strcat(testfile, TESTFILE);
/* Open the testfile */
fid1 = H5Fopen(testfile, H5F_ACC_RDONLY, H5P_DEFAULT);