summaryrefslogtreecommitdiffstats
path: root/test/fillval.c
diff options
context:
space:
mode:
authorJames Laird <jlaird@hdfgroup.org>2006-07-31 19:46:16 (GMT)
committerJames Laird <jlaird@hdfgroup.org>2006-07-31 19:46:16 (GMT)
commitbeb04ae817268a49656b5abe043627dcbba15e5d (patch)
tree557b0c0908867dbb7185c3954626b2a2da3bcaf4 /test/fillval.c
parent70b46a1d89e7f9f4a82748a9e1cc21fb4f121ebe (diff)
downloadhdf5-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/fillval.c')
-rw-r--r--test/fillval.c91
1 files changed, 51 insertions, 40 deletions
diff --git a/test/fillval.c b/test/fillval.c
index 07da951..b204523 100644
--- a/test/fillval.c
+++ b/test/fillval.c
@@ -1410,56 +1410,67 @@ int
main(int argc, char *argv[])
{
int nerrors=0, argno, test_contig=1, test_chunk=1, test_compact=1;
+ const char *envval = NULL;
hid_t fapl=-1;
- if (argc>=2) {
- test_contig = test_chunk = test_compact = 0;
- for (argno=1; argno<argc; argno++) {
- if (!strcmp(argv[argno], "contiguous")) {
- test_contig = 1;
- } else if (!strcmp(argv[argno], "chunked")) {
- test_chunk = 1;
- } else if (!strcmp(argv[argno], "compact")) {
- test_compact =1;
- } else {
- fprintf(stderr, "usage: %s [contiguous] [chunked] [compact]\n", argv[0]);
- exit(1);
+ envval = HDgetenv("HDF5_DRIVER");
+ if (envval == NULL)
+ envval = "nomatch";
+ if (HDstrcmp(envval, "core") && HDstrcmp(envval, "split") && HDstrcmp(envval, "multi")) {
+ if (argc>=2) {
+ test_contig = test_chunk = test_compact = 0;
+ for (argno=1; argno<argc; argno++) {
+ if (!strcmp(argv[argno], "contiguous")) {
+ test_contig = 1;
+ } else if (!strcmp(argv[argno], "chunked")) {
+ test_chunk = 1;
+ } else if (!strcmp(argv[argno], "compact")) {
+ test_compact =1;
+ } else {
+ fprintf(stderr, "usage: %s [contiguous] [chunked] [compact]\n", argv[0]);
+ exit(1);
+ }
}
}
- }
- h5_reset();
- fapl = h5_fileaccess();
+ h5_reset();
+ fapl = h5_fileaccess();
- nerrors += test_getset();
+ nerrors += test_getset();
- /* Chunked storage layout tests */
- if (test_chunk) {
- nerrors += test_create(fapl, FILENAME[0], H5D_CHUNKED);
- nerrors += test_rdwr (fapl, FILENAME[2], H5D_CHUNKED);
- nerrors += test_extend(fapl, FILENAME[4], H5D_CHUNKED);
- }
+ /* Chunked storage layout tests */
+ if (test_chunk) {
+ nerrors += test_create(fapl, FILENAME[0], H5D_CHUNKED);
+ nerrors += test_rdwr (fapl, FILENAME[2], H5D_CHUNKED);
+ nerrors += test_extend(fapl, FILENAME[4], H5D_CHUNKED);
+ }
- /* Contiguous storage layout tests */
- if (test_contig) {
- nerrors += test_create(fapl, FILENAME[1], H5D_CONTIGUOUS);
- nerrors += test_rdwr (fapl, FILENAME[3], H5D_CONTIGUOUS);
- nerrors += test_extend(fapl, FILENAME[5], H5D_CONTIGUOUS);
- nerrors += test_compatible();
- }
+ /* Contiguous storage layout tests */
+ if (test_contig) {
+ nerrors += test_create(fapl, FILENAME[1], H5D_CONTIGUOUS);
+ nerrors += test_rdwr (fapl, FILENAME[3], H5D_CONTIGUOUS);
+ nerrors += test_extend(fapl, FILENAME[5], H5D_CONTIGUOUS);
+ nerrors += test_compatible();
+ }
- /* Compact dataset storage tests */
- if (test_compact) {
- nerrors += test_create(fapl, FILENAME[6], H5D_COMPACT);
- nerrors += test_rdwr (fapl, FILENAME[7], H5D_COMPACT);
- }
+ /* Compact dataset storage tests */
+ if (test_compact) {
+ nerrors += test_create(fapl, FILENAME[6], H5D_COMPACT);
+ nerrors += test_rdwr (fapl, FILENAME[7], H5D_COMPACT);
+ }
- if (nerrors) goto error;
- puts("All fill value tests passed.");
- if (h5_cleanup(FILENAME, fapl)) remove(FILE_NAME_RAW);
+ if (nerrors) goto error;
+ puts("All fill value tests passed.");
+ if (h5_cleanup(FILENAME, fapl)) remove(FILE_NAME_RAW);
+ }
+ else
+ {
+ puts("All fill value tests skipped - Incompatible with current Virtual File Driver");
+ }
return 0;
- error:
- puts("***** FILL VALUE TESTS FAILED *****");
- return 1;
+ error:
+ puts("***** FILL VALUE TESTS FAILED *****");
+ return 1;
+
}