Dear all,I am planning to add a new feature. It allows one to specify the timeout in tests in seconds like so:
TESTS = fast.sh slow.sh long.sh AM_TEST_TIMEOUT = 2 AM_TEST_TIMEOUTS = long.sh:10 # matched like XFAIL_TESTSSome design constraints: it has to work on bmake, GNU make and other exotic makes; `make check TEST_TIMEOUT=0' disables the timeouts (or sets another value globally in seconds...). Then, a test timeout is correctly reported as ERROR or FAIL (depending on DISABLE_HARD_ERRORS).
Some problems that I am currently working out: I think that on timeout, the entire process tree should be reaped. Unfortunately, zsh can't do job control in non-interactive shells. I also noticed some issues with interactive programs + AM_TEST_TIMEOUT (although, this is probably an unrealistic edge case).
Do you have any suggestions on this? I will try to wrap up the code and push it tomorrow. I find myself copy-pasting this feature over and over in my Automake scripts, as seen in e.g. https://github.com/iczelia/balrogg/blob/trunk/Makefile.am.
-- With Valediction, Kamila Szewczyk (https://iczelia.net)
OpenPGP_0xC868F0B6DE38409D.asc
Description: OpenPGP public key
OpenPGP_signature.asc
Description: OpenPGP digital signature
