summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPekka Paalanen <pekka.paalanen@collabora.co.uk>2017-02-07 14:18:01 +0200
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>2017-02-07 14:25:27 +0200
commit19222b4c89ee442c538c05ef1914b4268d283b2f (patch)
treebace0499642e780d647f073daead2f45ff530ade /tests
parent4f3cad78285fca473b4a108aa5276fc08addee56 (diff)
tests: doc iterating in the runner
The iteration counter cannot be used to detect non-iterated tests defined with TEST and FAIL_TEST. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Diffstat (limited to 'tests')
-rw-r--r--tests/weston-test-runner.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/weston-test-runner.c b/tests/weston-test-runner.c
index f197265d..f0566ac0 100644
--- a/tests/weston-test-runner.c
+++ b/tests/weston-test-runner.c
@@ -88,6 +88,7 @@ list_tests(void)
fprintf(stderr, " %s\n", t->name);
}
+/* iteration is valid only if test_data is not NULL */
static int
exec_and_report_test(const struct weston_test *t, void *test_data, int iteration)
{
@@ -143,7 +144,10 @@ exec_and_report_test(const struct weston_test *t, void *test_data, int iteration
}
}
-/* Returns number of tests and number of pass / fail in param args */
+/* Returns number of tests and number of pass / fail in param args.
+ * Even non-iterated tests go through here, they simply have n_elements = 1 and
+ * table_data = NULL.
+ */
static int
iterate_test(const struct weston_test *t, int *passed, int *skipped)
{