2003-04-01 01:59:04 +08:00
|
|
|
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
|
|
|
* 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://hdf.ncsa.uiuc.edu/HDF5/doc/Copyright.html. If you do not have *
|
|
|
|
* access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. *
|
|
|
|
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
|
|
|
|
1998-11-21 11:36:51 +08:00
|
|
|
/*
|
|
|
|
* Programmer: Robb Matzke <matzke@llnl.gov>
|
|
|
|
* Friday, November 20, 1998
|
|
|
|
*
|
|
|
|
* Purpose: Test support stuff.
|
|
|
|
*/
|
|
|
|
#ifndef _H5TEST_H
|
|
|
|
#define _H5TEST_H
|
|
|
|
|
|
|
|
#undef NDEBUG
|
2001-04-04 02:09:16 +08:00
|
|
|
#include "hdf5.h"
|
|
|
|
#include "H5private.h"
|
1998-11-21 11:36:51 +08:00
|
|
|
|
2002-04-28 16:34:17 +08:00
|
|
|
#ifdef H5_STDC_HEADERS
|
1998-11-21 11:36:51 +08:00
|
|
|
# include <signal.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define H5T_PACKAGE
|
2001-04-04 02:09:16 +08:00
|
|
|
#include "H5Tpkg.h" /*to turn off hardware conversions*/
|
1998-11-21 11:36:51 +08:00
|
|
|
|
2000-01-26 12:20:36 +08:00
|
|
|
/*
|
|
|
|
* This contains the filename prefix specificied as command line option for
|
|
|
|
* the parallel test files.
|
|
|
|
*/
|
|
|
|
extern char *paraprefix;
|
2002-05-22 02:49:44 +08:00
|
|
|
#ifdef H5_HAVE_PARALLEL
|
2002-05-30 02:40:29 +08:00
|
|
|
extern MPI_Info h5_io_info_g; /* MPI INFO object for IO */
|
2002-05-22 02:49:44 +08:00
|
|
|
#endif
|
2000-01-26 12:20:36 +08:00
|
|
|
|
1998-11-21 11:36:51 +08:00
|
|
|
/*
|
|
|
|
* The name of the test is printed by saying TESTING("something") which will
|
|
|
|
* result in the string `Testing something' being flushed to standard output.
|
2001-01-26 01:03:29 +08:00
|
|
|
* If a test passes, fails, or is skipped then the PASSED(), H5_FAILED(), or
|
|
|
|
* SKIPPED() macro should be called. After H5_FAILED() or SKIPPED() the caller
|
1998-11-21 11:36:51 +08:00
|
|
|
* should print additional information to stdout indented by at least four
|
|
|
|
* spaces. If the h5_errors() is used for automatic error handling then
|
2001-01-26 01:03:29 +08:00
|
|
|
* the H5_FAILED() macro is invoked automatically when an API function fails.
|
1998-11-21 11:36:51 +08:00
|
|
|
*/
|
|
|
|
#define TESTING(WHAT) {printf("%-70s", "Testing " WHAT); fflush(stdout);}
|
1999-10-01 00:14:14 +08:00
|
|
|
#define PASSED() {puts(" PASSED");fflush(stdout);}
|
2001-01-26 01:03:29 +08:00
|
|
|
#define H5_FAILED() {puts("*FAILED*");fflush(stdout);}
|
1999-10-01 00:14:14 +08:00
|
|
|
#define SKIPPED() {puts(" -SKIP-");fflush(stdout);}
|
1998-11-21 11:36:51 +08:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Print the current location on the standard output stream.
|
|
|
|
*/
|
|
|
|
#define AT() printf (" at %s:%d in %s()...\n", \
|
|
|
|
__FILE__, __LINE__, __FUNCTION__);
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2000-09-10 08:08:27 +08:00
|
|
|
int h5_cleanup(const char *base_name[], hid_t fapl);
|
1999-04-16 03:57:50 +08:00
|
|
|
herr_t h5_errors(void *client_data);
|
1999-06-15 22:58:25 +08:00
|
|
|
char *h5_fixname(const char *base_name, hid_t fapl, char *fullname,
|
1998-11-21 11:36:51 +08:00
|
|
|
size_t size);
|
|
|
|
hid_t h5_fileaccess(void);
|
|
|
|
void h5_no_hwconv(void);
|
|
|
|
void h5_reset(void);
|
2002-04-23 01:12:14 +08:00
|
|
|
void h5_show_hostname(void);
|
2002-06-13 02:24:25 +08:00
|
|
|
#ifdef H5_HAVE_PARALLEL
|
2002-05-22 02:49:44 +08:00
|
|
|
int h5_set_info_object(void);
|
|
|
|
void h5_dump_info_object(MPI_Info info);
|
|
|
|
#endif
|
1998-11-21 11:36:51 +08:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif
|