From: Pekka Paalanen Date: Tue, 7 Feb 2017 12:18:01 +0000 (+0200) Subject: tests: doc iterating in the runner X-Git-Tag: upstream/5.0.0~625 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=19222b4c89ee442c538c05ef1914b4268d283b2f;p=platform%2Fupstream%2Fweston.git 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 Reviewed-by: Quentin Glidic --- diff --git a/tests/weston-test-runner.c b/tests/weston-test-runner.c index f197265..f0566ac 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) {