From ae9c685133c5a1f30418d6fda1ce898c11c7053c Mon Sep 17 00:00:00 2001 From: Rodrigo Vivi Date: Tue, 9 Dec 2014 20:44:11 -0500 Subject: lib/igt_aux: Introduce igt_interactive_debug_manual_check. This is an extention of igt_debug_wait_for_keypress that also can have customized message and return key pressed. v2: This is actualy a v2. V1 was an extension of original igt_debug_wait_for_keypress but it was nacked. v3: Make [Y/n] check inside aux function as suggested by Daniel. Also renaming and adding first use case along with the axu function. v4: Simplify function name and make it assert pressed key is different from n/N as suggested by Daniel. Cc: Daniel Vetter Signed-off-by: Rodrigo Vivi --- tests/kms_psr_sink_crc.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'tests') diff --git a/tests/kms_psr_sink_crc.c b/tests/kms_psr_sink_crc.c index 7f0b989a..7558b6d8 100644 --- a/tests/kms_psr_sink_crc.c +++ b/tests/kms_psr_sink_crc.c @@ -266,7 +266,7 @@ static void get_sink_crc(data_t *data, char *crc) { igt_require(file); ret = fscanf(file, "%s\n", crc); - igt_require_f(ret > 0, "Sink CRC is unreliable on this machine. Try manual debug with --interactive-debug=manual\n"); + igt_require_f(ret > 0, "Sink CRC is unreliable on this machine. Try manual debug with --interactive-debug=no-crc\n"); fclose(file); @@ -316,11 +316,7 @@ 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"); + igt_debug_manual_check("no-crc", expected); igt_assert(igt_interactive_debug || condition); } -- cgit v1.2.3