From ad5df72d572516aaa22295b7d5eb537253d727a7 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 21 Sep 2017 15:56:29 +1000 Subject: [PATCH] test: fix test listing Signed-off-by: Peter Hutterer --- test/litest.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/test/litest.c b/test/litest.c index c0be73e7..54fe77cb 100644 --- a/test/litest.c +++ b/test/litest.c @@ -3515,12 +3515,19 @@ static void litest_list_tests(struct list *tests) { struct suite *s; + const char *last_test_name = NULL; list_for_each(s, tests, node) { struct test *t; printf("%s:\n", s->name); list_for_each(t, &s->tests, node) { - printf(" %s\n", t->name); + if (!last_test_name || + !streq(last_test_name, t->name)) + printf(" %s:\n", t->name); + + last_test_name = t->name; + + printf(" %s\n", t->devname); } } }