[igt-dev] [PATCH i-g-t 3/3] lib: disallow fixtures/subtest groups in simple tests

Daniel Vetter
2019-02-20T14:25:00Z

They don't work, see igt_can_fail(). We already check for
test_with_subtests in igt_subtest.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
lib/igt_core.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/lib/igt_core.c b/lib/igt_core.c
index 71b05d3bbd3b..6eb4798e24ef 100644
--- a/lib/igt_core.c
+++ b/lib/igt_core.c
@@ -463,6 +463,7 @@ uint64_t igt_nsec_elapsed(struct timespec *start)
bool __igt_fixture(void)
{
assert(!in_fixture);
+ assert(test_with_subtests);

if (igt_only_list_subtests())
return false;
@@ -975,6 +976,8 @@ bool igt_only_list_subtests(void)

void __igt_subtest_group_save(int *save)
{
+ assert(test_with_subtests);
+
*save = skip_subtests_henceforth;
}

--
2.20.1