summaryrefslogtreecommitdiff
path: root/src/tests/timeout.c
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2018-07-30 12:50:58 -0400
committerStefan Schmidt <s.schmidt@samsung.com>2018-08-16 09:59:58 +0200
commit440b7ce03f29378bf04af9ed2016049dfb8df40e (patch)
treeeb6b0499f5421141108c639284adea921b0c23a3 /src/tests/timeout.c
parent1320ba435e6fcd3ed868d0798cc4e9a74d4ffd59 (diff)
tests: add failsafe timeout for tests running in fork mode
some tests manage to deadlock themselves on travis, seemingly due to some hard to reproduce issues which are a result of the extremely low amount of resources available on travis builds this adds a simple 'timeout' process which does nothing but sleep(60); and then returns. the exiting of this process will cause the main test process to break out of the deadlock and then exit instead of timing out a ci build Differential Revision: https://phab.enlightenment.org/D6697
Diffstat (limited to 'src/tests/timeout.c')
-rw-r--r--src/tests/timeout.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/tests/timeout.c b/src/tests/timeout.c
new file mode 100644
index 0000000000..de881535c1
--- /dev/null
+++ b/src/tests/timeout.c
@@ -0,0 +1,15 @@
1#include <unistd.h>
2
3#if defined(__clang__)
4# pragma clang diagnostic ignored "-Wunused-parameter"
5#elif (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) || __GNUC__ > 4
6# pragma GCC diagnostic ignored "-Wunused-parameter"
7#endif
8
9
10int
11main(int arc, char *argv[])
12{
13 sleep(60);
14 return 0;
15}