diff options
author | James Laird <jlaird@hdfgroup.org> | 2006-07-31 19:46:16 (GMT) |
---|---|---|
committer | James Laird <jlaird@hdfgroup.org> | 2006-07-31 19:46:16 (GMT) |
commit | beb04ae817268a49656b5abe043627dcbba15e5d (patch) | |
tree | 557b0c0908867dbb7185c3954626b2a2da3bcaf4 /test/dsets.c | |
parent | 70b46a1d89e7f9f4a82748a9e1cc21fb4f121ebe (diff) | |
download | hdf5-beb04ae817268a49656b5abe043627dcbba15e5d.zip hdf5-beb04ae817268a49656b5abe043627dcbba15e5d.tar.gz hdf5-beb04ae817268a49656b5abe043627dcbba15e5d.tar.bz2 |
[svn-r12519] Fixed "make check-vfd"
"make check-vfd" will now run all tests in the test directory with different
file drivers (at least, all of those tests that use the testing framework's
FAPL). Tests that fail will be skipped.
This is not a perfect fix, but is better than nothing.
Along with this change, check-vfd should be added to the Daily Tests.
Diffstat (limited to 'test/dsets.c')
-rw-r--r-- | test/dsets.c | 135 |
1 files changed, 73 insertions, 62 deletions
diff --git a/test/dsets.c b/test/dsets.c index 8555168..66e9e90 100644 --- a/test/dsets.c +++ b/test/dsets.c @@ -5989,74 +5989,85 @@ main(void) double rdcc_w0; int nerrors=0; char filename[1024]; + const char *envval = NULL; - h5_reset(); - fapl = h5_fileaccess(); + /* Don't run this test using certain file drivers */ + envval = HDgetenv("HDF5_DRIVER"); + if (envval == NULL) + envval = "nomatch"; + if (HDstrcmp(envval, "core") && HDstrcmp(envval, "split") && HDstrcmp(envval, "multi") && HDstrcmp(envval, "family")) { + h5_reset(); + fapl = h5_fileaccess(); - /* Set the random # seed */ - HDsrandom((unsigned long)HDtime(NULL)); + /* Set the random # seed */ + HDsrandom((unsigned long)HDtime(NULL)); - h5_fixname(FILENAME[0], fapl, filename, sizeof filename); + h5_fixname(FILENAME[0], fapl, filename, sizeof filename); - /* Turn off the chunk cache, so all the chunks are immediately written to disk */ - if(H5Pget_cache(fapl, &mdc_nelmts, &rdcc_nelmts, &rdcc_nbytes, &rdcc_w0)<0) goto error; - rdcc_nbytes=0; - if(H5Pset_cache(fapl, mdc_nelmts, rdcc_nelmts, rdcc_nbytes, rdcc_w0)<0) goto error; + /* Turn off the chunk cache, so all the chunks are immediately written to disk */ + if(H5Pget_cache(fapl, &mdc_nelmts, &rdcc_nelmts, &rdcc_nbytes, &rdcc_w0)<0) goto error; + rdcc_nbytes=0; + if(H5Pset_cache(fapl, mdc_nelmts, rdcc_nelmts, rdcc_nbytes, rdcc_w0)<0) goto error; - if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0) { - goto error; - } + if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0) { + goto error; + } - /* Cause the library to emit initial messages */ - if ((grp = H5Gcreate (file, "emit diagnostics", 0))<0) goto error; - if (H5Gset_comment(grp, ".", "Causes diagnostic messages to be emitted")<0) - goto error; - if (H5Gclose (grp)<0) goto error; - - nerrors += test_create(file)<0 ?1:0; - nerrors += test_simple_io(fapl)<0 ?1:0; - nerrors += test_compact_io(fapl)<0 ?1:0; - nerrors += test_max_compact(fapl)<0 ?1:0; - nerrors += test_conv_buffer(file)<0 ?1:0; - nerrors += test_tconv(file)<0 ?1:0; - nerrors += test_filters(file)<0 ?1:0; - nerrors += test_onebyte_shuffle(file)<0 ?1:0; - nerrors += test_nbit_int(file)<0 ?1:0; - nerrors += test_nbit_float(file)<0 ?1:0; - nerrors += test_nbit_double(file)<0 ?1:0; - nerrors += test_nbit_array(file)<0 ?1:0; - nerrors += test_nbit_compound(file)<0 ?1:0; - nerrors += test_nbit_compound_2(file)<0 ?1:0; - nerrors += test_nbit_compound_3(file)<0 ?1:0; - nerrors += test_scaleoffset_int(file)<0 ?1:0; - nerrors += test_scaleoffset_int_2(file)<0 ?1:0; - nerrors += test_scaleoffset_float(file)<0 ?1:0; - nerrors += test_scaleoffset_float_2(file)<0 ?1:0; - nerrors += test_scaleoffset_double(file)<0 ?1:0; - nerrors += test_scaleoffset_double_2(file)<0 ?1:0; - nerrors += test_multiopen (file)<0 ?1:0; - nerrors += test_types(file)<0 ?1:0; - nerrors += test_userblock_offset(fapl)<0 ?1:0; - nerrors += test_missing_filter(file)<0 ?1:0; - nerrors += test_can_apply(file)<0 ?1:0; - nerrors += test_set_local(fapl)<0 ?1:0; - nerrors += test_can_apply_szip(file)<0 ?1:0; - nerrors += test_compare_dcpl(file)<0 ?1:0; - nerrors += test_filter_delete(file)<0 ?1:0; - nerrors += test_filters_endianess()<0 ?1:0; - nerrors += test_zero_dims(file)<0 ?1:0; - nerrors += test_missing_chunk(file)<0 ?1:0; - - if (H5Fclose(file)<0) goto error; - - if (nerrors) goto error; - printf("All dataset tests passed.\n"); - h5_cleanup(FILENAME, fapl); + /* Cause the library to emit initial messages */ + if ((grp = H5Gcreate (file, "emit diagnostics", 0))<0) goto error; + if (H5Gset_comment(grp, ".", "Causes diagnostic messages to be emitted")<0) + goto error; + if (H5Gclose (grp)<0) goto error; + + nerrors += test_create(file)<0 ?1:0; + nerrors += test_simple_io(fapl)<0 ?1:0; + nerrors += test_compact_io(fapl)<0 ?1:0; + nerrors += test_max_compact(fapl)<0 ?1:0; + nerrors += test_conv_buffer(file)<0 ?1:0; + nerrors += test_tconv(file)<0 ?1:0; + nerrors += test_filters(file)<0 ?1:0; + nerrors += test_onebyte_shuffle(file)<0 ?1:0; + nerrors += test_nbit_int(file)<0 ?1:0; + nerrors += test_nbit_float(file)<0 ?1:0; + nerrors += test_nbit_double(file)<0 ?1:0; + nerrors += test_nbit_array(file)<0 ?1:0; + nerrors += test_nbit_compound(file)<0 ?1:0; + nerrors += test_nbit_compound_2(file)<0 ?1:0; + nerrors += test_nbit_compound_3(file)<0 ?1:0; + nerrors += test_scaleoffset_int(file)<0 ?1:0; + nerrors += test_scaleoffset_int_2(file)<0 ?1:0; + nerrors += test_scaleoffset_float(file)<0 ?1:0; + nerrors += test_scaleoffset_float_2(file)<0 ?1:0; + nerrors += test_scaleoffset_double(file)<0 ?1:0; + nerrors += test_scaleoffset_double_2(file)<0 ?1:0; + nerrors += test_multiopen (file)<0 ?1:0; + nerrors += test_types(file)<0 ?1:0; + nerrors += test_userblock_offset(fapl)<0 ?1:0; + nerrors += test_missing_filter(file)<0 ?1:0; + nerrors += test_can_apply(file)<0 ?1:0; + nerrors += test_set_local(fapl)<0 ?1:0; + nerrors += test_can_apply_szip(file)<0 ?1:0; + nerrors += test_compare_dcpl(file)<0 ?1:0; + nerrors += test_filter_delete(file)<0 ?1:0; + nerrors += test_filters_endianess()<0 ?1:0; + nerrors += test_zero_dims(file)<0 ?1:0; + nerrors += test_missing_chunk(file)<0 ?1:0; + + if (H5Fclose(file)<0) goto error; + + if (nerrors) goto error; + printf("All dataset tests passed.\n"); + h5_cleanup(FILENAME, fapl); + } + else + { + puts("All dataset tests skipped - Incompatible with current Virtual File Driver"); + } return 0; - error: - nerrors = MAX(1, nerrors); - printf("***** %d DATASET TEST%s FAILED! *****\n", - nerrors, 1 == nerrors ? "" : "S"); - return 1; + error: + nerrors = MAX(1, nerrors); + printf("***** %d DATASET TEST%s FAILED! *****\n", + nerrors, 1 == nerrors ? "" : "S"); + return 1; } |