mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2026-04-02 07:15:53 -04:00
tests: add timeout
Add test_set_timeout() function that allows the test to set timeout for its completition. Any other call to the function re-sets the timeout to the new value. The timeouts can be turned off (usefull when debugging) by setting evironment variable WAYLAND_TESTS_NO_TIMEOUTS. v2: rename NO_TIMEOUTS to WAYLAND_TESTS_NO_TIMEOUTS use unsigned int as argument of test_set_timeout() improve printing of the message about timeout Signed-off-by: Marek Chalupa <mchqwerty@gmail.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
This commit is contained in:
parent
47c752ad82
commit
7bf8049c48
2 changed files with 54 additions and 0 deletions
|
|
@ -37,4 +37,11 @@ count_open_fds(void);
|
|||
void
|
||||
exec_fd_leak_check(int nr_expected_fds); /* never returns */
|
||||
|
||||
/*
|
||||
* set/reset the timeout in seconds. The timeout starts
|
||||
* at the point of invoking this function
|
||||
*/
|
||||
void
|
||||
test_set_timeout(unsigned int);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue