summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorPedro Vicente Nunes <pvn@hdfgroup.org>2004-03-12 03:51:33 (GMT)
committerPedro Vicente Nunes <pvn@hdfgroup.org>2004-03-12 03:51:33 (GMT)
commit8737c9ff2b9e7986ea1ef37d4480c11df06bcfc0 (patch)
treef625024f2a65919d2c93b91cee08a64e0ded1148 /test
parent7fe2ed7f9124758c95f698dc3cf8945b359264ee (diff)
downloadhdf5-8737c9ff2b9e7986ea1ef37d4480c11df06bcfc0.zip
hdf5-8737c9ff2b9e7986ea1ef37d4480c11df06bcfc0.tar.gz
hdf5-8737c9ff2b9e7986ea1ef37d4480c11df06bcfc0.tar.bz2
[svn-r8256] 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:
Diffstat (limited to 'test')
-rw-r--r--test/dsets.c24
1 files changed, 22 insertions, 2 deletions
diff --git a/test/dsets.c b/test/dsets.c
index 9591bfa..3862f84 100644
--- a/test/dsets.c
+++ b/test/dsets.c
@@ -3219,6 +3219,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;
@@ -3259,8 +3261,17 @@ 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 */
@@ -3272,8 +3283,17 @@ 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 */