diff options
author | Raymond Lu <songyulu@hdfgroup.org> | 2011-03-23 16:41:44 (GMT) |
---|---|---|
committer | Raymond Lu <songyulu@hdfgroup.org> | 2011-03-23 16:41:44 (GMT) |
commit | ccaefedaf2ff94c8b64291aabbe3b90dcf3a1aaf (patch) | |
tree | 1c23b22fc52993f69114d22c0769890f653ff50e /test | |
parent | 2aabc3f41568a5daec0f1cae711c97a5bb82878d (diff) | |
download | hdf5-ccaefedaf2ff94c8b64291aabbe3b90dcf3a1aaf.zip hdf5-ccaefedaf2ff94c8b64291aabbe3b90dcf3a1aaf.tar.gz hdf5-ccaefedaf2ff94c8b64291aabbe3b90dcf3a1aaf.tar.bz2 |
[svn-r20301] brought revisions 19868:20300 from the 1.8.6_vms branch to the 1.8 branch
Diffstat (limited to 'test')
-rw-r--r-- | test/H5srcdir.h | 13 | ||||
-rw-r--r-- | test/fheap.c | 2 | ||||
-rw-r--r-- | test/getname.c | 2 | ||||
-rw-r--r-- | test/h5test.c | 7 | ||||
-rw-r--r-- | test/lheap.c | 5 | ||||
-rw-r--r-- | test/stab.c | 4 |
6 files changed, 29 insertions, 4 deletions
diff --git a/test/H5srcdir.h b/test/H5srcdir.h index 55700cb..8bc8780 100644 --- a/test/H5srcdir.h +++ b/test/H5srcdir.h @@ -32,7 +32,11 @@ static char srcdir_path[1024] = ""; static char srcdir_testpath[1024] = ""; /* Append the test file name to the srcdir path and return the whole string */ +#ifdef H5_VMS +static const char *H5_get_srcdir_filename(char *filename) +#else static const char *H5_get_srcdir_filename(const char *filename) +#endif { const char *srcdir = HDgetenv("srcdir"); @@ -43,8 +47,17 @@ static const char *H5_get_srcdir_filename(const char *filename) /* Build path to test file */ if((HDstrlen(srcdir) + HDstrlen(filename) + 2) < sizeof(srcdir_testpath)) { HDstrcpy(srcdir_testpath, srcdir); +#ifdef H5_VMS + if(filename[0] == '[') { + char *tmp = filename; + srcdir_testpath[strlen(srcdir)-1] = '\0'; + strcat(srcdir_testpath, ++tmp); + } else + strcat(srcdir_testpath, filename); +#else HDstrcat(srcdir_testpath, "/"); HDstrcat(srcdir_testpath, filename); +#endif return(srcdir_testpath); } /* end if */ else diff --git a/test/fheap.c b/test/fheap.c index fd344df..2963e4c 100644 --- a/test/fheap.c +++ b/test/fheap.c @@ -15939,7 +15939,9 @@ curr_test = FHEAP_TEST_NORMAL; nerrors += test_id_limits(fapl, &small_cparam); nerrors += test_filtered_create(fapl, &small_cparam); nerrors += test_size(fapl, &small_cparam); +#ifndef H5_CANNOT_OPEN_TWICE nerrors += test_reopen_hdr(fapl, &small_cparam); +#endif /*H5_CANNOT_OPEN_TWICE*/ #else /* QAK */ HDfprintf(stderr, "Uncomment tests!\n"); #endif /* QAK */ diff --git a/test/getname.c b/test/getname.c index bef4756..bbaaa04 100644 --- a/test/getname.c +++ b/test/getname.c @@ -2927,7 +2927,9 @@ main(void) nerrors += test_main(file_id, fapl); nerrors += test_obj_ref(fapl); nerrors += test_reg_ref(fapl); +#ifndef H5_CANNOT_OPEN_TWICE nerrors += test_elinks(fapl); +#endif /*H5_CANNOT_OPEN_TWICE*/ /* Close file */ H5Fclose(file_id); diff --git a/test/h5test.c b/test/h5test.c index edbce9d..ecc7bf8 100644 --- a/test/h5test.c +++ b/test/h5test.c @@ -1115,10 +1115,13 @@ getenv_all(MPI_Comm comm, int root, const char* name) hid_t h5_make_local_copy(char *origfilename, char *local_copy_name) { - char filename[FILENAME_BUF_SIZE] = ""; int fd_old = (-1), fd_new = (-1); /* File descriptors for copying data */ ssize_t nread; /* Number of bytes read in */ char buf[READ_BUF_SIZE]; /* Buffer for copying data */ + char filename[FILENAME_BUF_SIZE] = ""; +#ifdef H5_VMS + HDstrcat(filename, origfilename); +#else char * srcdir = HDgetenv("srcdir"); /* The source directory */ if(srcdir && ((HDstrlen(srcdir) + @@ -1127,6 +1130,7 @@ h5_make_local_copy(char *origfilename, char *local_copy_name) HDstrcat(filename, "/"); } HDstrcat(filename, origfilename); +#endif /* Copy old file into temporary file */ if((fd_old = HDopen(filename, O_RDONLY, 0666)) < 0) return -1; @@ -1143,4 +1147,3 @@ h5_make_local_copy(char *origfilename, char *local_copy_name) return 0; } - diff --git a/test/lheap.c b/test/lheap.c index dd7ff48..1a4ca20 100644 --- a/test/lheap.c +++ b/test/lheap.c @@ -169,8 +169,11 @@ main(void) { const char *testfile = H5_get_srcdir_filename(TESTFILE); /* Corrected test file name */ hid_t dset = -1; - +#ifdef H5_VMS + file = H5Fopen(TESTFILE, H5F_ACC_RDONLY, H5P_DEFAULT); +#else file = H5Fopen(testfile, H5F_ACC_RDONLY, H5P_DEFAULT); +#endif if(file >= 0){ if((dset = H5Dopen2(file, "/Dataset1", H5P_DEFAULT)) < 0) TEST_ERROR diff --git a/test/stab.c b/test/stab.c index e8ffec3..d897899 100644 --- a/test/stab.c +++ b/test/stab.c @@ -57,8 +57,10 @@ const char *FILENAME[] = { /* The group_old.h5 is generated from gen_old_fill.c in HDF5 'test' directory * for version 1.6. To get this data file, simply compile gen_old_group.c with * the HDF5 library in that branch and run it. */ +/* I changed the name "group_old.h5.copy" to "group_old_copy.h5" because OpenVMS + * doesn't like any file name with more than one ".". SLU 2010/12/13 */ #define FILE_OLD_GROUPS "group_old.h5" -#define FILE_OLD_GROUPS_COPY "group_old.h5.copy" +#define FILE_OLD_GROUPS_COPY "group_old_copy.h5" /* Definitions for 'no_compact' test */ #define NO_COMPACT_TOP_GROUP "top" |