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

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

 



On Mon, Mar 16, 2015 at 10:04:28AM +0100, Daniel Vetter wrote:
> On Fri, Mar 13, 2015 at 06:19:24PM -0400, Rodrigo Vivi wrote:
> > 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@xxxxxxxxx>
> > ---
> >  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");
> > +	}
> 
> Imo it'd be better to move this check into the helper too. And then give
> it a name that makes it clear that it's a checkpoint for the user for
> manual testing. I don't have any good ideas, but maybe
> igt_interactive_debug_manual_check?

Maybe better igt_debug_manual_check for consistency with
igt_debug_wait_for_keypress.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
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