[PATCH i-g-t 03/10] lib/tests: Test that igt_describe works with dynamic subtests

Petri Latvala petri.latvala at intel.com
Thu Aug 8 10:06:08 UTC 2019


Signed-off-by: Petri Latvala <petri.latvala at intel.com>
---
 lib/tests/igt_describe.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/lib/tests/igt_describe.c b/lib/tests/igt_describe.c
index 2ea47e9d..70ec055e 100644
--- a/lib/tests/igt_describe.c
+++ b/lib/tests/igt_describe.c
@@ -87,6 +87,13 @@ static void fake_main(int argc, char **argv) {
 	igt_subtest("F")
 		;
 
+	igt_describe("Dynamic container");
+	igt_dynamic_subtest_container("G") {
+		printf("should not be executed!\n");
+		igt_dynamic_subtest("should-not-list")
+			printf("should not be executed!\n");
+	}
+
 	igt_exit();
 }
 
@@ -129,7 +136,10 @@ static const char DESCRIBE_ALL_OUTPUT[] = \
 	"\n"
 	"SUB F ../lib/tests/igt_describe.c:87:\n"
 	"  verylongwordthatshoudlbeprintedeventhoughitspastthewrppinglimitverylongwordthatshoudlbeprintedeventhoughitspastthewrappinglimit\n"
-	"  verylongwordthatshoudlbeprintedeventhoughitspastthewrappinglimitverylongwordthatshoudlbeprintedeventhoughitspastthewrappinglimit\n\n";
+	"  verylongwordthatshoudlbeprintedeventhoughitspastthewrappinglimitverylongwordthatshoudlbeprintedeventhoughitspastthewrappinglimit\n"
+	"\n"
+	"SUB G ../lib/tests/igt_describe.c:91:\n"
+	"  Dynamic container\n\n";
 
 static const char JUST_C_OUTPUT[] = \
 	"the top level description\n"
-- 
2.19.1



More information about the Intel-gfx-trybot mailing list