summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@googlemail.com>2012-04-14 19:49:36 +0200
committerDavid Herrmann <dh.herrmann@googlemail.com>2012-04-14 19:49:36 +0200
commit24f189a31ae9741069141df6c43187b868e2974f (patch)
treed9d8980b0cbbd2f85bff92da858f99aac45f1f7a /tests
parent7a27de465bbe55dd55ab413bc5f26158548c5623 (diff)
test_output: run eloop for 5s instead of sleep()
The new eloop implementation allows to run the eloop for a fixed amount of time. Use this instead of sleeping for 5s which would prevent us from catching signals as the eloop blocks them in favor of signalfd. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/test_output.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/test_output.c b/tests/test_output.c
index 061f6dc..72bf663 100644
--- a/tests/test_output.c
+++ b/tests/test_output.c
@@ -53,6 +53,9 @@
#include "uterm.h"
#include "test_include.h"
+/* eloop object */
+static struct ev_eloop *eloop;
+
/* a colored quad */
float d_vert[] = { -1, -1, 1, -1, -1, 1, 1, -1, 1, 1, -1, 1 };
float d_col[] = { 1, 1, 0, 1,
@@ -144,7 +147,7 @@ static int set_outputs(struct uterm_video *video, int num, char **list)
}
log_notice("Waiting 5 seconds...");
- sleep(5);
+ ev_eloop_run(eloop, 5000);
log_notice("Exiting...");
gl_shader_unref(shader);
@@ -186,7 +189,6 @@ int main(int argc, char **argv)
{
struct uterm_video *video;
int ret;
- struct ev_eloop *eloop;
ret = test_prepare(argc, argv, &eloop);
if (ret)