diff mbox

[i-g-t,1/3] tests/kms_plane: Skip on no connected outputs

Message ID 1455885293-10964-2-git-send-email-gabriel.feceoru@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Feceoru, Gabriel Feb. 19, 2016, 12:34 p.m. UTC
When no display is connected all kms_plane subtests pass although
no testing is done.

Change it by reporting the subtests as skipped.

Signed-off-by: Gabriel Feceoru <gabriel.feceoru@intel.com>
---
 tests/kms_plane.c | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/tests/kms_plane.c b/tests/kms_plane.c
index b7a42c6..d8bb484 100644
--- a/tests/kms_plane.c
+++ b/tests/kms_plane.c
@@ -224,13 +224,18 @@  test_plane_position(data_t *data, enum pipe pipe, enum igt_plane plane,
 		    unsigned int flags)
 {
 	igt_output_t *output;
+	int connected_outs = 0;
 
 	igt_skip_on(pipe >= data->display.n_pipes);
 	igt_skip_on(plane >= data->display.pipes[pipe].n_planes);
 
-	for_each_connected_output(&data->display, output)
+	for_each_connected_output(&data->display, output) {
 		test_plane_position_with_output(data, pipe, plane, output,
 						flags);
+		connected_outs++;
+	}
+
+	igt_skip_on(connected_outs == 0);
 }
 
 /*
@@ -346,13 +351,18 @@  test_plane_panning(data_t *data, enum pipe pipe, enum igt_plane plane,
             unsigned int flags)
 {
 	igt_output_t *output;
+	int connected_outs = 0;
 
 	igt_skip_on(pipe >= data->display.n_pipes);
 	igt_skip_on(plane >= data->display.pipes[pipe].n_planes);
 
-	for_each_connected_output(&data->display, output)
+	for_each_connected_output(&data->display, output) {
 		test_plane_panning_with_output(data, pipe, plane, output,
 						flags);
+		connected_outs++;
+	}
+
+	igt_skip_on(connected_outs == 0);
 }
 
 static void