summaryrefslogtreecommitdiff
path: root/tests/weston-test-client-helper.c
diff options
context:
space:
mode:
authorEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>2014-02-07 09:34:48 +0100
committerKristian Høgsberg <krh@bitplanet.net>2014-02-18 13:50:29 -0800
commitdae8a4b9c5c7fd94646527095a9f83a5f936eaa4 (patch)
treeaeaccfff8b748cb67620b5d0dab16ca5fb7bb905 /tests/weston-test-client-helper.c
parent943cb120754ab1720410d8dfa35560e570a5944e (diff)
downloadweston-dae8a4b9c5c7fd94646527095a9f83a5f936eaa4.tar.gz
weston-dae8a4b9c5c7fd94646527095a9f83a5f936eaa4.tar.bz2
weston-dae8a4b9c5c7fd94646527095a9f83a5f936eaa4.zip
tests: Properly report skipped tests
We were calling exit(0) when tests were skipped, which counted them as passed instead of skipped. Fix this by properly exiting with 77 (which is what automake expects for skipped tests) from the tests themselves, then returning 77 again from weston-test-runner if all the tests were skipped. Finally the weston-test.so module catches weston-test-runner's exit code and uses it as an exit code, which is what automake will see and use. Signed-off-by: Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
Diffstat (limited to 'tests/weston-test-client-helper.c')
-rw-r--r--tests/weston-test-client-helper.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/weston-test-client-helper.c b/tests/weston-test-client-helper.c
index 399aa443..186b3956 100644
--- a/tests/weston-test-client-helper.c
+++ b/tests/weston-test-client-helper.c
@@ -505,9 +505,11 @@ skip(const char *fmt, ...)
vfprintf(stderr, fmt, argp);
va_end(argp);
- /* automake tests uses exit code 77, but we don't have a good
- * way to make weston exit with that from here. */
- exit(0);
+ /* automake tests uses exit code 77. weston-test-runner will see
+ * this and use it, and then weston-test's sigchld handler (in the
+ * weston process) will use that as an exit status, which is what
+ * automake will see in the end. */
+ exit(77);
}
static void