[03/10] lib/tests: Test that igt_describe works with dynamic subtests

Submitted by Petri Latvala on Aug. 8, 2019, 10:06 a.m.

Details

Message ID 20190808100615.19653-3-petri.latvala@intel.com
State New
Headers show
Series "Series without cover letter" ( rev: 1 ) in IGT - Trybot

Not browsing as part of any series.

Commit Message

Petri Latvala Aug. 8, 2019, 10:06 a.m.
Signed-off-by: Petri Latvala <petri.latvala@intel.com>
---
 lib/tests/igt_describe.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

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"