Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: igt-dev@lists.freedesktop.org
Cc: intel-gfx@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t 2/4] igt/kms_draw_crc: Test for a working GPU first
Date: Thu, 29 Aug 2019 14:05:23 +0100	[thread overview]
Message-ID: <20190829130525.28555-2-chris@chris-wilson.co.uk> (raw)
In-Reply-To: <20190829130525.28555-1-chris@chris-wilson.co.uk>

The draw-method-blt subtests require a working GPU, so create a subtest
group for the draw-methods, and skip the BLT group using
 igt_require_gem() in its fixture.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 tests/kms_draw_crc.c | 26 ++++++++++++++++++--------
 1 file changed, 18 insertions(+), 8 deletions(-)

diff --git a/tests/kms_draw_crc.c b/tests/kms_draw_crc.c
index ea14db9a0..c993833e8 100644
--- a/tests/kms_draw_crc.c
+++ b/tests/kms_draw_crc.c
@@ -325,14 +325,24 @@ igt_main
 
 	for (format_idx = 0; format_idx < N_FORMATS; format_idx++) {
 	for (method = 0; method < IGT_DRAW_METHOD_COUNT; method++) {
-	for (tiling_idx = 0; tiling_idx < N_TILING_METHODS; tiling_idx++) {
-		igt_subtest_f("draw-method-%s-%s-%s",
-			      format_str(format_idx),
-			      igt_draw_get_method_name(method),
-			      tiling_str(tiling_idx))
-			draw_method_subtest(method, format_idx,
-					    tilings[tiling_idx]);
-	} } }
+	igt_subtest_group {
+		igt_fixture {
+			if (method == IGT_DRAW_BLT)
+				igt_require_gem(drm_fd);
+		}
+
+		for (tiling_idx = 0;
+		     tiling_idx < N_TILING_METHODS;
+		     tiling_idx++) {
+			igt_subtest_f("draw-method-%s-%s-%s",
+				      format_str(format_idx),
+				      igt_draw_get_method_name(method),
+				      tiling_str(tiling_idx))
+				draw_method_subtest(method,
+						    format_idx,
+						    tilings[tiling_idx]);
+		}
+	}}}
 
 	igt_subtest("fill-fb")
 		fill_fb_subtest();
-- 
2.23.0

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  reply	other threads:[~2019-08-29 13:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-29 13:05 [igt-dev] [PATCH i-g-t 1/4] igt/kms_flip_tiling: Check GEM availability before use Chris Wilson
2019-08-29 13:05 ` Chris Wilson [this message]
2019-08-29 13:05 ` [igt-dev] [PATCH i-g-t 3/4] igt/gem_blits: Check for blitter support " Chris Wilson
2019-08-29 13:05 ` [igt-dev] [PATCH i-g-t 4/4] igt/kms_frontbuffer_tracking: Skip over IGT_DRAW_BLT when there's no BLT Chris Wilson
2019-08-29 13:52 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/4] igt/kms_flip_tiling: Check GEM availability before use Patchwork
2019-08-30  3:03 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190829130525.28555-2-chris@chris-wilson.co.uk \
    --to=chris@chris-wilson.co.uk \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox