summaryrefslogtreecommitdiffstats
path: root/test/h5test.h
diff options
context:
space:
mode:
Diffstat (limited to 'test/h5test.h')
-rw-r--r--test/h5test.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/h5test.h b/test/h5test.h
index 7aa585e..be5e769 100644
--- a/test/h5test.h
+++ b/test/h5test.h
@@ -107,6 +107,15 @@ extern MPI_Info h5_io_info_g; /* MPI INFO object for IO */
#define FAIL_STACK_ERROR {H5_FAILED(); AT(); \
H5Eprint_stack(H5E_DEFAULT, stdout); goto error;}
+/*
+ * Alarm definitions to wait up (terminate) a test that runs too long.
+ */
+#define alarm_seconds 1200 /* default is 20 minutes */
+#define ALARM_ON HDalarm(alarm_seconds)
+#define ALARM_OFF HDalarm(0)
+/* set alarms to N seconds if N > 0, else use default alarm_seconds. */
+#define ALARM_SET(N) HDalarm((N)>0 ? N : alarm_seconds)
+
#ifdef __cplusplus
extern "C" {
#endif