summaryrefslogtreecommitdiffstats
path: root/test/h5test.h
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2005-09-19 20:32:18 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2005-09-19 20:32:18 (GMT)
commit465f9be6e3f818d20c650976a14d7698063cad00 (patch)
tree944e7c7b9fe3f25e4d285a6daaf01362cac1fb15 /test/h5test.h
parentbd24d226d67b26dd43910df4e677751e6120f8f5 (diff)
downloadhdf5-465f9be6e3f818d20c650976a14d7698063cad00.zip
hdf5-465f9be6e3f818d20c650976a14d7698063cad00.tar.gz
hdf5-465f9be6e3f818d20c650976a14d7698063cad00.tar.bz2
[svn-r11441] Purpose:
Feature. Description: Added ALARM_ON, ALARM_OFF feature to terminate tests that run more than the default time limit. So far, the feature is applied in the standard test frame. Platforms tested: heping PP.
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