diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2010-08-16 21:07:06 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2010-08-16 21:07:06 (GMT) |
commit | 9f779228f94af8c653ade6d13f0eed95be4f9551 (patch) | |
tree | 8b56c23be9cf35a18bafc839d36038d1d91f2cec /test/testframe.c | |
parent | d9af3b4fdf7f2a8e2ef26855482d0af251864414 (diff) | |
download | hdf5-9f779228f94af8c653ade6d13f0eed95be4f9551.zip hdf5-9f779228f94af8c653ade6d13f0eed95be4f9551.tar.gz hdf5-9f779228f94af8c653ade6d13f0eed95be4f9551.tar.bz2 |
[svn-r19243] Description:
Bring r19242 from trunk to 1.8 branch:
Add in override for testing timeout alarm to allow "HDF5_ALARM_SECONDS"
environment variable to change the timeout value from the default value.
Tested on:
Mac OS X/32 10.6.4 (amazon) w/debug & production
(Too minor to require h5committest)
Diffstat (limited to 'test/testframe.c')
-rw-r--r-- | test/testframe.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/testframe.c b/test/testframe.c index 97d1e1a..1d7c958 100644 --- a/test/testframe.c +++ b/test/testframe.c @@ -588,3 +588,21 @@ void SetTest(const char *testname, int action) break; } } + + +/* + * Enable alarm on test execution, configurable by environment variable + */ +void TestAlarmOn(void) +{ + char * env_val = HDgetenv("HDF5_ALARM_SECONDS"); /* Alarm environment */ + unsigned long alarm_sec = H5_ALARM_SEC; /* Number of seconds before alarm goes off */ + + /* Get the alarm value from the environment variable, if set */ + if(env_val != NULL) + alarm_sec = (unsigned)HDstrtoul(env_val, (char **)NULL, 10); + + /* Set the number of seconds before alarm goes off */ + HDalarm((unsigned)alarm_sec); +} + |