[PATCH i-g-t 9/9] tests/kms_psr_sink_crc: Use pressed key to pass/fail.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is useful when 1 person is running all tests and other one is reading log willing
to know what tests passed and which failed. So tester is able to run all tests without
stop and send log to developer.

Signed-off-by: Rodrigo Vivi <rodrigo.vivi@xxxxxxxxx>
---
 tests/kms_psr_sink_crc.c | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/tests/kms_psr_sink_crc.c b/tests/kms_psr_sink_crc.c
index 8103ebb..305b52d 100644
--- a/tests/kms_psr_sink_crc.c
+++ b/tests/kms_psr_sink_crc.c
@@ -301,12 +301,17 @@ static bool is_green(char *crc)
 
 static void assert_or_manual(bool condition, const char *expected)
 {
-	if (igt_interactive_debug)
-		igt_info("Is %s?\n", expected);
-	else
-		igt_debug("%s\n", expected);
-	igt_debug_wait_for_keypress("manual",
-				    "Press any key to continue ...\n");
+	char msg[50];
+	char c;
+
+	igt_debug("%s\n", expected);
+
+	sprintf(msg, "Is %s [Y/n]?\n", expected);
+	c = igt_debug_wait_for_keypress("manual", msg);
+
+	if (c && (c == 'n' || c == 'N'))
+		igt_fail(-1);
+
 	igt_assert(igt_interactive_debug || condition);
 }
 
-- 
1.9.3

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx





[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux