summaryrefslogtreecommitdiffstats
path: root/test/objcopy.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/objcopy.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/objcopy.c')
-rwxr-xr-xtest/objcopy.c148
1 files changed, 79 insertions, 69 deletions
diff --git a/test/objcopy.c b/test/objcopy.c
index 9b2c5bf..a96d5b0 100755
--- a/test/objcopy.c
+++ b/test/objcopy.c
@@ -6347,84 +6347,94 @@ main(void)
{
int nerrors = 0;
hid_t fapl;
-
- /* Setup */
- h5_reset();
- fapl = h5_fileaccess();
-
- /* The tests... */
- nerrors += test_copy_named_datatype(fapl);
- nerrors += test_copy_named_datatype_vl(fapl);
- nerrors += test_copy_named_datatype_vl_vl(fapl);
- nerrors += test_copy_dataset_simple(fapl);
- nerrors += test_copy_dataset_simple_empty(fapl);
- nerrors += test_copy_dataset_compound(fapl);
- nerrors += test_copy_dataset_chunked(fapl);
- nerrors += test_copy_dataset_chunked_empty(fapl);
- nerrors += test_copy_dataset_chunked_sparse(fapl);
- nerrors += test_copy_dataset_compressed(fapl);
- nerrors += test_copy_dataset_compact(fapl);
- nerrors += test_copy_dataset_external(fapl);
- nerrors += test_copy_dataset_named_dtype(fapl);
- nerrors += test_copy_dataset_named_dtype_hier(fapl);
- nerrors += test_copy_dataset_named_dtype_hier_outside(fapl);
- nerrors += test_copy_dataset_multi_ohdr_chunks(fapl);
- nerrors += test_copy_dataset_attr_named_dtype(fapl);
- nerrors += test_copy_dataset_contig_vl(fapl);
- nerrors += test_copy_dataset_chunked_vl(fapl);
- nerrors += test_copy_dataset_compact_vl(fapl);
- nerrors += test_copy_dataset_compressed_vl(fapl);
- nerrors += test_copy_attribute_vl(fapl);
- nerrors += test_copy_dataset_compact_named_vl(fapl);
- nerrors += test_copy_dataset_contig_named_vl(fapl);
- nerrors += test_copy_dataset_chunked_named_vl(fapl);
- nerrors += test_copy_dataset_compressed_named_vl(fapl);
- nerrors += test_copy_dataset_compact_vl_vl(fapl);
- nerrors += test_copy_dataset_contig_vl_vl(fapl);
- nerrors += test_copy_dataset_chunked_vl_vl(fapl);
- nerrors += test_copy_dataset_compressed_vl_vl(fapl);
- nerrors += test_copy_group_empty(fapl);
- nerrors += test_copy_group(fapl);
- nerrors += test_copy_group_deep(fapl);
- nerrors += test_copy_group_loop(fapl);
- nerrors += test_copy_group_wide_loop(fapl);
- nerrors += test_copy_group_links(fapl);
- nerrors += test_copy_soft_link(fapl);
- nerrors += test_copy_exist(fapl);
- nerrors += test_copy_path(fapl);
- nerrors += test_copy_same_file_named_datatype(fapl);
- nerrors += test_copy_option(fapl, H5G_COPY_WITHOUT_ATTR_FLAG, FALSE, "H5Gcopy(): without attributes");
+ const char *envval = NULL;
+
+ /* Don't run this test using the core, split, or multi file drivers */
+ envval = HDgetenv("HDF5_DRIVER");
+ if (envval == NULL)
+ envval = "nomatch";
+ if (HDstrcmp(envval, "core") && HDstrcmp(envval, "split") && HDstrcmp(envval, "multi")) {
+ /* Setup */
+ h5_reset();
+ fapl = h5_fileaccess();
+
+ /* The tests... */
+ nerrors += test_copy_named_datatype(fapl);
+ nerrors += test_copy_named_datatype_vl(fapl);
+ nerrors += test_copy_named_datatype_vl_vl(fapl);
+ nerrors += test_copy_dataset_simple(fapl);
+ nerrors += test_copy_dataset_simple_empty(fapl);
+ nerrors += test_copy_dataset_compound(fapl);
+ nerrors += test_copy_dataset_chunked(fapl);
+ nerrors += test_copy_dataset_chunked_empty(fapl);
+ nerrors += test_copy_dataset_chunked_sparse(fapl);
+ nerrors += test_copy_dataset_compressed(fapl);
+ nerrors += test_copy_dataset_compact(fapl);
+ nerrors += test_copy_dataset_external(fapl);
+ nerrors += test_copy_dataset_named_dtype(fapl);
+ nerrors += test_copy_dataset_named_dtype_hier(fapl);
+ nerrors += test_copy_dataset_named_dtype_hier_outside(fapl);
+ nerrors += test_copy_dataset_multi_ohdr_chunks(fapl);
+ nerrors += test_copy_dataset_attr_named_dtype(fapl);
+ nerrors += test_copy_dataset_contig_vl(fapl);
+ nerrors += test_copy_dataset_chunked_vl(fapl);
+ nerrors += test_copy_dataset_compact_vl(fapl);
+ nerrors += test_copy_dataset_compressed_vl(fapl);
+ nerrors += test_copy_attribute_vl(fapl);
+ nerrors += test_copy_dataset_compact_named_vl(fapl);
+ nerrors += test_copy_dataset_contig_named_vl(fapl);
+ nerrors += test_copy_dataset_chunked_named_vl(fapl);
+ nerrors += test_copy_dataset_compressed_named_vl(fapl);
+ nerrors += test_copy_dataset_compact_vl_vl(fapl);
+ nerrors += test_copy_dataset_contig_vl_vl(fapl);
+ nerrors += test_copy_dataset_chunked_vl_vl(fapl);
+ nerrors += test_copy_dataset_compressed_vl_vl(fapl);
+ nerrors += test_copy_group_empty(fapl);
+ nerrors += test_copy_group(fapl);
+ nerrors += test_copy_group_deep(fapl);
+ nerrors += test_copy_group_loop(fapl);
+ nerrors += test_copy_group_wide_loop(fapl);
+ nerrors += test_copy_group_links(fapl);
+ nerrors += test_copy_soft_link(fapl);
+ nerrors += test_copy_exist(fapl);
+ nerrors += test_copy_path(fapl);
+ nerrors += test_copy_same_file_named_datatype(fapl);
+ nerrors += test_copy_option(fapl, H5G_COPY_WITHOUT_ATTR_FLAG, FALSE, "H5Gcopy(): without attributes");
#ifdef H5_GROUP_REVISION
- nerrors += test_copy_option(fapl, 0, TRUE, "H5Gcopy(): with missing groups");
+ nerrors += test_copy_option(fapl, 0, TRUE, "H5Gcopy(): with missing groups");
#endif /* H5_GROUP_REVISION */
- nerrors += test_copy_option(fapl, H5G_COPY_EXPAND_SOFT_LINK_FLAG, FALSE, "H5Gcopy(): expand soft link");
- nerrors += test_copy_option(fapl, H5G_COPY_SHALLOW_HIERARCHY_FLAG, FALSE, "H5Gcopy(): shallow group copy");
-
-/* TODO: not implemented
- nerrors += test_copy_option(fapl, H5G_COPY_EXPAND_EXT_LINK_FLAG, FALSE, "H5Gcopy: expand external link");
- nerrors += test_copy_option(fapl, H5G_COPY_EXPAND_EXPAND_OBJ_REFERENCE_FLAG, FALSE, "H5Gcopy: expand object reference");
-*/
+ nerrors += test_copy_option(fapl, H5G_COPY_EXPAND_SOFT_LINK_FLAG, FALSE, "H5Gcopy(): expand soft link");
+ nerrors += test_copy_option(fapl, H5G_COPY_SHALLOW_HIERARCHY_FLAG, FALSE, "H5Gcopy(): shallow group copy");
-/* TODO: Add more tests for copying objects in same file */
+ /* TODO: not implemented
+ nerrors += test_copy_option(fapl, H5G_COPY_EXPAND_EXT_LINK_FLAG, FALSE, "H5Gcopy: expand external link");
+ nerrors += test_copy_option(fapl, H5G_COPY_EXPAND_EXPAND_OBJ_REFERENCE_FLAG, FALSE, "H5Gcopy: expand object reference");
+ */
+ /* TODO: Add more tests for copying objects in same file */
-/* TODO: Add more tests for copying objects in mounted files
- nerrors += test_copy_mount(fapl);
-*/
- /* Reset file address checking info */
- addr_reset();
+ /* TODO: Add more tests for copying objects in mounted files
+ nerrors += test_copy_mount(fapl);
+ */
- /* Results */
- if (nerrors) {
- printf("***** %d OBJECT COPY TEST%s FAILED! *****\n",
- nerrors, (1 == nerrors ? "" : "S"));
- exit(1);
- }
+ /* Reset file address checking info */
+ addr_reset();
- puts ("All object copying tests passed.");
- h5_cleanup(FILENAME, fapl);
+ /* Results */
+ if (nerrors) {
+ printf("***** %d OBJECT COPY TEST%s FAILED! *****\n",
+ nerrors, (1 == nerrors ? "" : "S"));
+ exit(1);
+ }
+ puts ("All object copying tests passed.");
+ h5_cleanup(FILENAME, fapl);
+ }
+ else
+ {
+ puts("All object copying tests skipped - Incompatible with current Virtual File Driver");
+ }
return 0;
} /* main */