summaryrefslogtreecommitdiffstats
path: root/test/links.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/links.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/links.c')
-rw-r--r--test/links.c65
1 files changed, 38 insertions, 27 deletions
diff --git a/test/links.c b/test/links.c
index a2da2e6..0e4f680 100644
--- a/test/links.c
+++ b/test/links.c
@@ -1459,38 +1459,49 @@ main(void)
{
int nerrors = 0;
hid_t fapl;
-
- h5_reset();
- fapl = h5_fileaccess();
-
- /* The tests... */
- nerrors += mklinks(fapl) < 0 ? 1 : 0;
- nerrors += cklinks(fapl) < 0 ? 1 : 0;
- nerrors += new_links(fapl) < 0 ? 1 : 0;
- nerrors += ck_new_links(fapl) < 0 ? 1 : 0;
- nerrors += long_links(fapl) < 0 ? 1 : 0;
- nerrors += toomany(fapl) < 0 ? 1 : 0;
-
- /* Test new H5L link creation routine */
+ const char *envval = NULL;
+
+ envval = HDgetenv("HDF5_DRIVER");
+ if (envval == NULL)
+ envval = "nomatch";
+ if (HDstrcmp(envval, "core") && HDstrcmp(envval, "split")) {
+ h5_reset();
+ fapl = h5_fileaccess();
+
+ /* The tests... */
+ nerrors += mklinks(fapl) < 0 ? 1 : 0;
+ nerrors += cklinks(fapl) < 0 ? 1 : 0;
+ nerrors += new_links(fapl) < 0 ? 1 : 0;
+ nerrors += ck_new_links(fapl) < 0 ? 1 : 0;
+ nerrors += long_links(fapl) < 0 ? 1 : 0;
+ nerrors += toomany(fapl) < 0 ? 1 : 0;
+
+ /* Test new H5L link creation routine */
#ifdef H5_GROUP_REVISION
- nerrors += test_h5l_create(fapl);
- nerrors += test_lcpl(fapl);
+ nerrors += test_h5l_create(fapl);
+ nerrors += test_lcpl(fapl);
#endif
- nerrors += test_move(fapl);
- nerrors += test_copy(fapl);
+ nerrors += test_move(fapl);
+ nerrors += test_copy(fapl);
#ifdef H5_GROUP_REVISION
- nerrors += test_move_preserves(fapl);
+ nerrors += test_move_preserves(fapl);
#endif
- nerrors += test_compat(fapl);
-
- /* Results */
- if (nerrors) {
- printf("***** %d LINK TEST%s FAILED! *****\n",
- nerrors, 1 == nerrors ? "" : "S");
- exit(1);
+ nerrors += test_compat(fapl);
+
+ /* Results */
+ if (nerrors) {
+ printf("***** %d LINK TEST%s FAILED! *****\n",
+ nerrors, 1 == nerrors ? "" : "S");
+ exit(1);
+ }
+ printf("All link tests passed.\n");
+ h5_cleanup(FILENAME, fapl);
+ }
+ else
+ {
+ puts("All link tests skipped - Incompatible with current Virtual File Driver");
}
- printf("All link tests passed.\n");
- h5_cleanup(FILENAME, fapl);
return 0;
+
}