summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/H5srcdir.h13
-rw-r--r--test/fheap.c2
-rw-r--r--test/getname.c2
-rw-r--r--test/h5test.c15
-rw-r--r--test/lheap.c5
-rw-r--r--test/stab.c4
6 files changed, 37 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 3d8e69d..afbe56c 100644
--- a/test/fheap.c
+++ b/test/fheap.c
@@ -16298,7 +16298,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 25b751f..8762f90 100644
--- a/test/h5test.c
+++ b/test/h5test.c
@@ -1115,10 +1115,22 @@ getenv_all(MPI_Comm comm, int root, const char* name)
hid_t
h5_make_local_copy(char *origfilename, char *local_copy_name)
{
- const char *filename = H5_get_srcdir_filename(origfilename); /* Corrected test file name */
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) +
+ HDstrlen(origfilename) + 6) < FILENAME_BUF_SIZE)) {
+ HDstrcpy(filename, srcdir);
+ HDstrcat(filename, "/");
+ }
+ HDstrcat(filename, origfilename);
+#endif
/* Copy old file into temporary file */
if((fd_old = HDopen(filename, O_RDONLY, 0666)) < 0) return -1;
@@ -1135,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 9f78a15..ab6ee9f 100644
--- a/test/lheap.c
+++ b/test/lheap.c
@@ -179,8 +179,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"