summaryrefslogtreecommitdiffstats
path: root/tools/h5repack/testh5repack_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/h5repack/testh5repack_main.c')
-rw-r--r--tools/h5repack/testh5repack_main.c34
1 files changed, 20 insertions, 14 deletions
diff --git a/tools/h5repack/testh5repack_main.c b/tools/h5repack/testh5repack_main.c
index ddecd98..4c0a8c5 100644
--- a/tools/h5repack/testh5repack_main.c
+++ b/tools/h5repack/testh5repack_main.c
@@ -203,7 +203,8 @@ int main (void)
TESTING(" removing szip filter");
-#ifdef H5_HAVE_FILTER_SZIP
+#if defined (H5_HAVE_FILTER_SZIP) && defined (H5_SZIP_CAN_ENCODE)
+
if (h5repack_init (&pack_options, 0)<0)
TEST_ERROR;
if (h5repack_addfilter("dset_szip:NONE",&pack_options)<0)
@@ -216,7 +217,6 @@ int main (void)
TEST_ERROR;
if (h5repack_end (&pack_options)<0)
TEST_ERROR;
-
PASSED();
#else
SKIPPED();
@@ -330,12 +330,11 @@ int main (void)
TESTING(" adding szip filter");
-#ifdef H5_HAVE_FILTER_SZIP
-
/*-------------------------------------------------------------------------
* test an individual object option
*-------------------------------------------------------------------------
*/
+#if defined (H5_HAVE_FILTER_SZIP) && defined (H5_SZIP_CAN_ENCODE)
if (h5repack_init (&pack_options, 0)<0)
TEST_ERROR;
@@ -364,7 +363,7 @@ int main (void)
*/
TESTING(" adding szip filter to all");
-#ifdef H5_HAVE_FILTER_SZIP
+#if defined (H5_HAVE_FILTER_SZIP) && defined (H5_SZIP_CAN_ENCODE)
if (h5repack_init (&pack_options, 0)<0)
TEST_ERROR;
@@ -379,7 +378,8 @@ TESTING(" adding szip filter to all");
if (h5repack_end (&pack_options)<0)
TEST_ERROR;
- PASSED();
+ PASSED();
+
#else
SKIPPED();
#endif
@@ -522,8 +522,10 @@ TESTING(" addding shuffle filter to all");
#endif
if (h5repack_addfilter("dset1:SHUF",&pack_options)<0)
TEST_ERROR;
- if (h5repack_addfilter("dset1:SZIP=8",&pack_options)<0)
- TEST_ERROR;
+#if defined (H5_HAVE_FILTER_SZIP) && defined (H5_SZIP_CAN_ENCODE)
+ if (h5repack_addfilter("dset1:SZIP=8",&pack_options)<0)
+ TEST_ERROR;
+#endif
if (h5repack_addfilter("dset1:GZIP=1",&pack_options)<0)
TEST_ERROR;
if (h5repack(FNAME4,FNAME4OUT,&pack_options)<0)
@@ -542,7 +544,7 @@ TESTING(" addding shuffle filter to all");
* filter conversion from deflate to szip
*-------------------------------------------------------------------------
*/
-#ifdef H5_HAVE_FILTER_DEFLATE
+#if defined(H5_HAVE_FILTER_DEFLATE) && defined(H5_HAVE_FILTER_SZIP) && defined(H5_SZIP_CAN_ENCODE)
if (h5repack_init (&pack_options, 0)<0)
TEST_ERROR;
if (h5repack_addfilter("dset_gzip:SZIP=8",&pack_options)<0)
@@ -556,16 +558,18 @@ TESTING(" addding shuffle filter to all");
if (h5repack_end (&pack_options)<0)
TEST_ERROR;
PASSED();
-#else
+#else
SKIPPED();
-#endif
+#endif
+
TESTING(" filter conversion from szip to deflate");
/*-------------------------------------------------------------------------
* filter conversion from szip to deflate
*-------------------------------------------------------------------------
*/
-#ifdef H5_HAVE_FILTER_SZIP
+#if defined (H5_HAVE_FILTER_SZIP) && defined (H5_SZIP_CAN_ENCODE)
+
if (h5repack_init (&pack_options, 0)<0)
TEST_ERROR;
if (h5repack_addfilter("dset_szip:GZIP=1",&pack_options)<0)
@@ -579,6 +583,7 @@ TESTING(" addding shuffle filter to all");
if (h5repack_end (&pack_options)<0)
TEST_ERROR;
PASSED();
+
#else
SKIPPED();
#endif
@@ -588,7 +593,8 @@ TESTING(" addding shuffle filter to all");
* filter conversion from szip to deflate
*-------------------------------------------------------------------------
*/
-#ifdef H5_HAVE_FILTER_SZIP
+#if defined (H5_HAVE_FILTER_SZIP) && defined (H5_SZIP_CAN_ENCODE)
+
if (h5repack_init (&pack_options, 0)<0)
TEST_ERROR;
if (h5repack_addfilter("dset_all:GZIP=1",&pack_options)<0)
@@ -601,7 +607,7 @@ TESTING(" addding shuffle filter to all");
TEST_ERROR;
if (h5repack_end (&pack_options)<0)
TEST_ERROR;
- PASSED();
+ PASSED();
#else
SKIPPED();
#endif