summaryrefslogtreecommitdiffstats
path: root/test/testframe.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/testframe.c')
-rw-r--r--test/testframe.c22
1 files changed, 4 insertions, 18 deletions
diff --git a/test/testframe.c b/test/testframe.c
index 9bcccd1..bc7ba0d 100644
--- a/test/testframe.c
+++ b/test/testframe.c
@@ -319,9 +319,9 @@ PerformTests(void)
MESSAGE(5, ("===============================================\n"));
Test[Loop].NumErrors = num_errs;
Test_parameters = Test[Loop].Parameters;
- TestAlarmOn();
+ ALARM_ON;
Test[Loop].Call();
- TestAlarmOff();
+ ALARM_OFF;
Test[Loop].NumErrors = num_errs - Test[Loop].NumErrors;
MESSAGE(5, ("===============================================\n"));
MESSAGE(5, ("There were %d errors detected.\n\n", (int)Test[Loop].NumErrors));
@@ -632,15 +632,12 @@ SetTest(const char *testname, int action)
}
}
-/* Enable a test timer that will kill long-running tests, the time is configurable
- * via an environment variable.
- *
- * Only useful on POSIX systems where alarm(2) is present.
+/*
+ * Enable alarm on test execution, configurable by environment variable
*/
void
TestAlarmOn(void)
{
-#ifdef H5_HAVE_ALARM
char *env_val = HDgetenv("HDF5_ALARM_SECONDS"); /* Alarm environment */
unsigned long alarm_sec = H5_ALARM_SEC; /* Number of seconds before alarm goes off */
@@ -650,15 +647,4 @@ TestAlarmOn(void)
/* Set the number of seconds before alarm goes off */
HDalarm((unsigned)alarm_sec);
-#endif
-}
-
-/* Disable the test timer */
-void
-TestAlarmOff(void)
-{
-#ifdef H5_HAVE_ALARM
- /* Set the number of seconds to zero */
- HDalarm(0);
-#endif
}