summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPedro Vicente Nunes <pvn@hdfgroup.org>2004-03-12 03:43:23 (GMT)
committerPedro Vicente Nunes <pvn@hdfgroup.org>2004-03-12 03:43:23 (GMT)
commit7de24aa706e7d283a36d7bbbaf57edba0296d4bc (patch)
treea6da4590fd4ba5f676912587bfe5b473f7f9d76a
parent4c0ffcb8143ba437004a0f7f95bbd58486ac1155 (diff)
downloadhdf5-7de24aa706e7d283a36d7bbbaf57edba0296d4bc.zip
hdf5-7de24aa706e7d283a36d7bbbaf57edba0296d4bc.tar.gz
hdf5-7de24aa706e7d283a36d7bbbaf57edba0296d4bc.tar.bz2
[svn-r8255] Purpose:
bug fix Description: the added binary files to read did not have the construction of the "srcdir" path Solution: add it Platforms tested: linux Misc. update:
-rw-r--r--test/dsets.c26
1 files changed, 24 insertions, 2 deletions
diff --git a/test/dsets.c b/test/dsets.c
index 9ce6604..58c315d 100644
--- a/test/dsets.c
+++ b/test/dsets.c
@@ -3316,6 +3316,8 @@ test_filters_endianess(void)
int buf[2];
int rank=1;
int i;
+ char *srcdir = getenv("srcdir"); /* the source directory */
+ char data_file[512]=""; /* buffer to hold name of existing file */
for (i=0; i<2; i++){
buf[i]=1;
@@ -3356,8 +3358,18 @@ test_filters_endianess(void)
* step 2: open a file written on a little-endian machine in step 1
*-------------------------------------------------------------------------
*/
+
+ /* compose the name of the file to open, using the srcdir, if appropriate */
+ strcpy(data_file, "");
+ if ( srcdir )
+ {
+ strcpy(data_file, srcdir);
+ strcat(data_file, "/");
+ }
+ strcat( data_file, "test_filters_le.hdf5");
+
/* open */
- if ((fid=H5Fopen("test_filters_le.hdf5",H5F_ACC_RDONLY,H5P_DEFAULT))<0)
+ if ((fid=H5Fopen(data_file,H5F_ACC_RDONLY,H5P_DEFAULT))<0)
goto error;
/* read */
@@ -3369,8 +3381,18 @@ test_filters_endianess(void)
* step 3: open a file written on a big-endian machine in step 1
*-------------------------------------------------------------------------
*/
+
+ /* compose the name of the file to open, using the srcdir, if appropriate */
+ strcpy(data_file, "");
+ if ( srcdir )
+ {
+ strcpy(data_file, srcdir);
+ strcat(data_file, "/");
+ }
+ strcat( data_file, "test_filters_be.hdf5");
+
/* open */
- if ((fid=H5Fopen("test_filters_be.hdf5",H5F_ACC_RDONLY,H5P_DEFAULT))<0)
+ if ((fid=H5Fopen(data_file,H5F_ACC_RDONLY,H5P_DEFAULT))<0)
goto error;
/* read */