[svn-r20315] brought revisions 19868:20300 from the 1.8.6_vms branch to the trunk for VMS work

This commit is contained in:
Raymond Lu 2011-03-24 13:33:45 -05:00
parent f960ff573e
commit 3e8dc8cccc
15 changed files with 76 additions and 16 deletions

View File

@ -172,10 +172,16 @@ PROGRAM fortranlibtest
CALL external_test(cleanup, ret_total_error)
CALL write_test_status(ret_total_error, ' External dataset test', total_error)
!DEC$ if defined(H5_VMS)
GOTO 9
!DEC$ else
ret_total_error = 0
CALL multi_file_test(cleanup, ret_total_error)
CALL write_test_status(ret_total_error, ' Multi file driver test', total_error)
!DEC$ endif
9 CONTINUE
ret_total_error = 0
CALL test_chunk_cache (cleanup, ret_total_error)
CALL write_test_status(ret_total_error, ' Dataset chunk cache configuration', total_error)

View File

@ -1,6 +1,6 @@
Building and installation instructions for Alpha Open VMS
HDF5 1.8.0 release
February 12, 2008
HDF5 1.8.6 release
18 February 2011

View File

@ -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

View File

@ -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 */

View File

@ -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);

View File

@ -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;
}

View File

@ -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

View File

@ -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"

View File

@ -17,7 +17,7 @@ $!
$! This file builds C, Fortran, C++ HDF5 libraries and runs the tests
$! Specify location of the top HDF5 source directory
$
$ hdf5top == "sys$sysusers:[pourmal.hdf5]"
$ hdf5top == "disk$user:[hdfgroup.hdf5]"
$ len = F$LENGTH(hdf5top)
$ tmp = F$EXTRACT(0, len-1, hdf5top)
$ hdf5vms = tmp + ".VMS]"

View File

@ -15,7 +15,7 @@ $!#
$!
$! Make HDF5 C++ examples
$!
$ define zlib_dir sys$sysusers:[pourmal.zlib-1_2_3]
$ define zlib_dir disk$user:[hdfgroup.zlib-1_2_5_ieee]
$ cxxopt = "/float=ieee_float/standard=strict_ansi/define=H5_VMS/include=zlib_dir"
$ ccc := cxx 'cxxopt /include=([-.-.include])
$!

View File

@ -16,9 +16,8 @@ $! Makefile for VMS systems.
$!
$! Make HDF5 C examples
$!
$! ccopt = "/float=ieee_float/nowarnings/define=H5_VMS"
$
$ define zlib_dir sys$sysusers:[pourmale.zlib-1_2_3]
$ define zlib_dir disk$user:[hdfgroup.zlib-1_2_5_ieee]
$ ccopt = "/float=ieee_float/nowarnings/define=H5_VMS/include=zlib_dir"
$ ccc := cc 'ccopt /include=([-.-.include])
$ type sys$input
Compiling C examples

View File

@ -17,7 +17,7 @@ $!
$! Make HDF5 Fortran examples
$!
$ fcopt = "/float=ieee_float/define=H5_VMS"
$ define zlib_dir sys$sysusers:[pourmal.zlib-1_2_3]
$ define zlib_dir disk$user:[hdfgroup.zlib-1_2_5_ieee]
$ fff := fortran 'fcopt /module=[-.-.include]
$
$ type sys$input

View File

@ -38,7 +38,7 @@ $ copy [.tools.misc]make.com [-.tools.misc]
$!
$! Define location of ZLIB library. If you do not have it on your system, download
$! source code from http://www.zlib.net/, build and install on your system
$ define zlib_dir sys$sysusers:[pourmal.zlib-1_2_3]
$ define zlib_dir disk$user:[hdfgroup.zlib-1_2_5_ieee]
$! define zlib_dir sys$sysusers:[pourmal.zlib-1_2_3-ieee]
$!
$! Set up compilation flags here

View File

@ -65,7 +65,7 @@
#define H5_FP_TO_ULLONG_RIGHT_MAXIMUM 1
/* Define if gettimeofday() populates the tz pointer passed in */
#define H5_GETTIMEOFDAY_GIVES_TZ 1
/* #define H5_GETTIMEOFDAY_GIVES_TZ 1 */
/* Define to 1 if you have the `alarm' function. */
#define H5_HAVE_ALARM 1
@ -314,7 +314,7 @@
/* #undef H5_HAVE_STRUCT_TEXT_INFO */
/* Define if `struct timezone' is defined */
#define H5_HAVE_STRUCT_TIMEZONE 1
/* #define H5_HAVE_STRUCT_TIMEZONE 1 */
/* Define to 1 if `tm_zone' is member of `struct tm'. */
#define H5_HAVE_STRUCT_TM_TM_ZONE 1
@ -377,7 +377,7 @@
#define H5_HAVE_TMPFILE 1
/* Define if `tm_gmtoff' is a member of `struct tm' */
#define H5_HAVE_TM_GMTOFF 1
/* #define H5_HAVE_TM_GMTOFF 1 */
/* Define to 1 if your `struct tm' has `tm_zone'. Deprecated, use
`HAVE_STRUCT_TM_TM_ZONE' instead. */

22
vms/test/H5srcdir_str.h Normal file
View File

@ -0,0 +1,22 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
* the files COPYING and Copyright.html. COPYING can be found at the root *
* of the source code distribution tree; Copyright.html can be found at the *
* root level of an installed copy of the electronic HDF5 document set and *
* is linked from the top-level documents page. It can also be found at *
* http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
* access to either file, you may request a copy from help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* If you are reading this file and it has a '.h' suffix, it was automatically
* generated from the '.in' version. Make changes there. But for OpenVMS, this
* file is created by hand.
*/
/* Set the 'srcdir' path from configure time */
static const char *config_srcdir = "[.]";