diff options
author | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2004-03-15 18:33:51 (GMT) |
---|---|---|
committer | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2004-03-15 18:33:51 (GMT) |
commit | f217777cdb1ab50a59977ce0cdf9336b5e5a1c43 (patch) | |
tree | 618aa6e3243dd49680578afae88a721174cd6ecc | |
parent | 18ea37295989b8a3b9d03f47d17a53d701f1c9c1 (diff) | |
download | hdf5-f217777cdb1ab50a59977ce0cdf9336b5e5a1c43.zip hdf5-f217777cdb1ab50a59977ce0cdf9336b5e5a1c43.tar.gz hdf5-f217777cdb1ab50a59977ce0cdf9336b5e5a1c43.tar.bz2 |
[svn-r8261] Purpose:
bug fix
Description:
the test that reads a pre-saved file with filters must only be run
when that filter is available on the current configuration,
otherwise the library trigers a read error
Solution:
added a #ifdef for the filter, that prints -SKIP- in case we do not have the filter
Platforms tested:
linux
Misc. update:
-rw-r--r-- | test/dsets.c | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/test/dsets.c b/test/dsets.c index 58c315d..7cd26c3 100644 --- a/test/dsets.c +++ b/test/dsets.c @@ -3108,6 +3108,7 @@ test_filter_delete(hid_t file) TESTING("filter deletion"); +#if defined H5_HAVE_FILTER_DEFLATE && defined H5_HAVE_FILTER_SHUFFLE && defined H5_HAVE_FILTER_FLETCHER32 /* create the data space */ if ((sid = H5Screate_simple(2, dims, NULL))<0) goto error; @@ -3115,17 +3116,9 @@ test_filter_delete(hid_t file) if((dcpl = H5Pcreate(H5P_DATASET_CREATE))<0) goto error; if(H5Pset_chunk(dcpl, 2, chunk_dims)<0) goto error; -#if defined H5_HAVE_FILTER_FLETCHER32 if (H5Pset_fletcher32 (dcpl)<0) goto error; -#endif - -#if defined H5_HAVE_FILTER_DEFLATE if (H5Pset_deflate (dcpl, 6)<0) goto error; -#endif - -#if defined H5_HAVE_FILTER_SHUFFLE if (H5Pset_shuffle (dcpl)<0) goto error; -#endif /* create a dataset */ if ((dsid = H5Dcreate(file,"dsetdel", H5T_NATIVE_INT, sid, dcpl)) <0) goto error; @@ -3137,7 +3130,6 @@ test_filter_delete(hid_t file) * delete the deflate filter *---------------------------------------------------------------------- */ -#if defined H5_HAVE_FILTER_DEFLATE /* delete the deflate filter */ if (H5Premove_filter(dcpl1,H5Z_FILTER_DEFLATE)<0) goto error; @@ -3161,8 +3153,6 @@ test_filter_delete(hid_t file) goto error; } /* end if */ -#endif /*H5_HAVE_FILTER_DEFLATE*/ - /*---------------------------------------------------------------------- * delete all filters *---------------------------------------------------------------------- @@ -3188,6 +3178,9 @@ test_filter_delete(hid_t file) if (H5Sclose (sid)<0) goto error; PASSED(); +#else + SKIPPED(); +#endif return 0; error: @@ -3325,6 +3318,7 @@ test_filters_endianess(void) TESTING("filters with big-endian/little-endian data"); +#if defined H5_HAVE_FILTER_FLETCHER32 /*------------------------------------------------------------------------- * step1: create a file *------------------------------------------------------------------------- @@ -3339,9 +3333,7 @@ test_filters_endianess(void) if((dcpl = H5Pcreate(H5P_DATASET_CREATE))<0) goto error; if(H5Pset_chunk(dcpl,rank,chunk_dims)<0) goto error; -#if defined H5_HAVE_FILTER_FLETCHER32 if (H5Pset_fletcher32 (dcpl)<0) goto error; -#endif /* create a dataset */ if ((dsid = H5Dcreate(fid,"dset",H5T_NATIVE_INT,sid,dcpl)) <0) goto error; @@ -3402,6 +3394,9 @@ test_filters_endianess(void) if (H5Fclose(fid)<0) goto error; PASSED(); +#else + SKIPPED(); +#endif return 0; error: |