[Intel-gfx] [PATCH i-g-t 07/10] tests/kms_psr_sink_crc: Use pressed key to pass/fail.
Rodrigo Vivi
rodrigo.vivi at intel.com
Fri Mar 13 15:19:24 PDT 2015
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.
v2: Rebased after igt_debug_warn_and_wait_for_key
Signed-off-by: Rodrigo Vivi <rodrigo.vivi at intel.com>
---
tests/kms_psr_sink_crc.c | 20 +++++++++++++++-----
1 file changed, 15 insertions(+), 5 deletions(-)
diff --git a/tests/kms_psr_sink_crc.c b/tests/kms_psr_sink_crc.c
index 24f5ca8..ce50cdd 100644
--- a/tests/kms_psr_sink_crc.c
+++ b/tests/kms_psr_sink_crc.c
@@ -316,11 +316,21 @@ 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");
+ char msg[50];
+ char c;
+
+ igt_debug("%s\n", expected);
+
+ sprintf(msg, "Is %s [Y/n]? ", expected);
+ c = igt_debug_warn_and_wait_for_key("manual", msg);
+
+ if (c) {
+ if (c == 'n' || c == 'N')
+ igt_fail(-1);
+ else
+ igt_info("\n");
+ }
+
igt_assert(igt_interactive_debug || condition);
}
--
1.9.3
More information about the Intel-gfx
mailing list