summaryrefslogtreecommitdiffstats
path: root/test/h5test.h
blob: 695199c4e141debbf4f477d7911e43e7dca0b2a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
/*
 * Copyright (c) 1998-2002 NCSA
 *                  All rights reserved.
 *
 * Programmer:  Robb Matzke <matzke@llnl.gov>
 *              Friday, November 20, 1998
 *
 * Purpose:     Test support stuff.
 */
#ifndef _H5TEST_H
#define _H5TEST_H

#undef NDEBUG
#include "hdf5.h"
#include "H5private.h"

#ifdef H5_STDC_HEADERS
#   include <signal.h>
#endif

#define H5T_PACKAGE
#include "H5Tpkg.h"		/*to turn off hardware conversions*/

/*
 * This contains the filename prefix specificied as command line option for
 * the parallel test files. 
 */
extern char *paraprefix;
#ifdef H5_HAVE_PARALLEL
extern MPI_Info pio_info_g;         /* MPI INFO object to run the PIO */
#endif

/*
 * The name of the test is printed by saying TESTING("something") which will
 * result in the string `Testing something' being flushed to standard output.
 * 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
 * should print additional information to stdout indented by at least four
 * spaces.  If the h5_errors() is used for automatic error handling then
 * the H5_FAILED() macro is invoked automatically when an API function fails.
 */
#define TESTING(WHAT)	{printf("%-70s", "Testing " WHAT); fflush(stdout);}
#define PASSED()	{puts(" PASSED");fflush(stdout);}
#define H5_FAILED()	{puts("*FAILED*");fflush(stdout);}
#define SKIPPED()	{puts(" -SKIP-");fflush(stdout);}

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

int h5_cleanup(const char *base_name[], hid_t fapl);
herr_t h5_errors(void *client_data);
char *h5_fixname(const char *base_name, hid_t fapl, char *fullname,
		 size_t size);
hid_t h5_fileaccess(void);
void h5_no_hwconv(void);
void h5_reset(void);
#ifdef H5_HAVE_PARALLEL
void h5_show_hostname(void);
int h5_set_info_object(void);
void h5_dump_info_object(MPI_Info info);
#endif

#ifdef __cplusplus
}
#endif
#endif