diff mbox

[i-g-t,v3,3/7] tests/kms_atomic_transition: Add TEST_ONLY flag

Message ID 1485955089-30267-4-git-send-email-mika.kahola@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Mika Kahola Feb. 1, 2017, 1:18 p.m. UTC
Add TEST_ONLY flag to test atomic transition display commits without
actual real-life commit.

v2: use flag to force atomic commit with TEST_ONLY flag

Signed-off-by: Mika Kahola <mika.kahola@intel.com>
---
 tests/kms_atomic_transition.c | 66 ++++++++++++++++++++++++++++++++++++-------
 1 file changed, 56 insertions(+), 10 deletions(-)
diff mbox

Patch

diff --git a/tests/kms_atomic_transition.c b/tests/kms_atomic_transition.c
index 5fdb617..a1fa5b9 100644
--- a/tests/kms_atomic_transition.c
+++ b/tests/kms_atomic_transition.c
@@ -670,28 +670,74 @@  igt_main
 		igt_require_f(valid_outputs, "no valid crtc/connector combinations found\n");
 	}
 
-	igt_subtest("plane-all-transition")
+	igt_subtest("plane-all-transition") {
+		display.force_test_atomic = false;
 		for_each_pipe_with_valid_output(&display, pipe, output)
-			run_transition_test(&display, pipe, output, TRANSITION_PLANES, false);
+		        run_transition_test(&display, pipe, output, TRANSITION_PLANES, false);
+	}
+
+	igt_subtest("plane-all-transition-with-test") {
+		display.force_test_atomic = true;
+		for_each_pipe_with_valid_output(&display, pipe, output)
+		        run_transition_test(&display, pipe, output, TRANSITION_PLANES, false);
+	}
+
+	igt_subtest("plane-all-transition-nonblocking") {
+		display.force_test_atomic = false;
+		for_each_pipe_with_valid_output(&display, pipe, output)
+		        run_transition_test(&display, pipe, output, TRANSITION_PLANES, true);
+	}
+
+	igt_subtest("plane-all-transition-nonblocking-with-test") {
+		display.force_test_atomic = true;
+		for_each_pipe_with_valid_output(&display, pipe, output)
+		        run_transition_test(&display, pipe, output, TRANSITION_PLANES, true);
+	}
+
+	igt_subtest("plane-all-modeset-transition") {
+		display.force_test_atomic = false;
+		for_each_pipe_with_valid_output(&display, pipe, output)
+		        run_transition_test(&display, pipe, output, TRANSITION_MODESET, false);
+	}
 
-	igt_subtest("plane-all-transition-nonblocking")
+	igt_subtest("plane-all-modeset-transition-with-test") {
+		display.force_test_atomic = true;
 		for_each_pipe_with_valid_output(&display, pipe, output)
-			run_transition_test(&display, pipe, output, TRANSITION_PLANES, true);
+		        run_transition_test(&display, pipe, output, TRANSITION_MODESET, false);
+	}
 
-	igt_subtest("plane-all-modeset-transition")
+	igt_subtest("plane-toggle-modeset-transition") {
+		display.force_test_atomic = false;
 		for_each_pipe_with_valid_output(&display, pipe, output)
-			run_transition_test(&display, pipe, output, TRANSITION_MODESET, false);
+		        run_transition_test(&display, pipe, output, TRANSITION_MODESET_DISABLE, false);
+	}
 
-	igt_subtest("plane-toggle-modeset-transition")
+	igt_subtest("plane-toggle-modeset-transition-with-test") {
+		display.force_test_atomic = true;
 		for_each_pipe_with_valid_output(&display, pipe, output)
-			run_transition_test(&display, pipe, output, TRANSITION_MODESET_DISABLE, false);
+		        run_transition_test(&display, pipe, output, TRANSITION_MODESET_DISABLE, false);
+	}
 
 	for (i = 1; i <= I915_MAX_PIPES; i++) {
-		igt_subtest_f("%ix-modeset-transitions", i)
+		igt_subtest_f("%ix-modeset-transitions", i) {
+			display.force_test_atomic = false;
+			run_modeset_transition(&display, i, false);
+		}
+
+		igt_subtest_f("%ix-modeset-transitions-with-test", i) {
+			display.force_test_atomic = true;
 			run_modeset_transition(&display, i, false);
+		}
+
+		igt_subtest_f("%ix-modeset-transitions-nonblocking", i) {
+			display.force_test_atomic = false;
+			run_modeset_transition(&display, i, true);
+		}
 
-		igt_subtest_f("%ix-modeset-transitions-nonblocking", i)
+		igt_subtest_f("%ix-modeset-transitions-nonblocking-with-test", i) {
+			display.force_test_atomic = true;
 			run_modeset_transition(&display, i, true);
+		}
 	}
 
 	igt_fixture {