[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openembedded-core
Subject:    Re: [OE-core] [PATCH] oeqa/selftest/bbtests: Add taskexp_tty UI test
From:       "Reyna, David" <david.reyna () windriver ! com>
Date:       2022-05-31 1:48:12
Message-ID: BY5PR11MB4167DB2552A783B89A3497DAEADC9 () BY5PR11MB4167 ! namprd11 ! prod ! outlook ! com
[Download RAW message or body]

[Attachment #2 (unknown)]

Hi Richard,

I am going to send you a patch to allow the self-test for "taskexp_tty" to work in \
non-interactive terminals.

It will specifically cover the most sensitive parts of the code:
  * Test that the bitbake call executed correctly
  * Test that the returned data is sane

You should not need to change your unit test call - the API stays the same.

I will also remove the requirement for a color-enabled terminal at the same time.

David

-----Original Message-----
From: Reyna, David 
Sent: Sunday, May 29, 2022 12:39 PM
To: richard.purdie@linuxfoundation.org; openembedded-core@lists.openembedded.org
Subject: RE: [OE-core] [PATCH] oeqa/selftest/bbtests: Add taskexp_tty UI test

Hi Richard,

> "I was thinking about this and whilst I'm guessing, it could be because we're \
> running this in a CI environment that doesn't have an interactive terminal?"

1. The error is in the "check_screen_size", where it attempts to insure that the \
terminal windows is at least 83x26. According to the log, it (a) does start the \
screen, (b) it does find that the terminal is too small, but then (c) it _oddly_ \
crashes on the "curses.endwin()" where it tries to return to a normal terminal and \
provide a graceful error message.

2. I did not test on a non-interactive terminal. I will try to set up one and test \
accordingly. 

3. But the test environment _will_ have to have a large enough terminal window, else \
I will have to change the code to accommodate non-printable areas, which I can look \
into.

4. This is probably why there is no unit test for the original GTK taskexp :-).

David

p.s. we always strive for better problems!

-----Original Message-----
From: richard.purdie@linuxfoundation.org <richard.purdie@linuxfoundation.org> 
Sent: Sunday, May 29, 2022 5:44 AM
To: openembedded-core@lists.openembedded.org
Cc: Reyna, David <david.reyna@windriver.com>
Subject: Re: [OE-core] [PATCH] oeqa/selftest/bbtests: Add taskexp_tty UI test

On Sun, 2022-05-29 at 13:20 +0100, Richard Purdie via
lists.openembedded.org wrote:
> Hi David,
> 
> On Sun, 2022-05-29 at 11:25 +0100, Richard Purdie via
> lists.openembedded.org wrote:
> > Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> > ---
> > meta/lib/oeqa/selftest/cases/bbtests.py | 5 +++++
> > 1 file changed, 5 insertions(+)
> > 
> > diff --git a/meta/lib/oeqa/selftest/cases/bbtests.py \
> > b/meta/lib/oeqa/selftest/cases/bbtests.py index cfac7afcf49..d222f0fb297 100644
> > --- a/meta/lib/oeqa/selftest/cases/bbtests.py
> > +++ b/meta/lib/oeqa/selftest/cases/bbtests.py
> > @@ -205,6 +205,11 @@ SSTATE_DIR = \"${TOPDIR}/download-selftest\"
> > result = runCmd('bitbake -R conf/postfile.conf -e | grep TEST_POSTFILE=')
> > self.assertIn('postfile', result.output)
> > 
> > +    def test_taskexp_tty(self):
> > +        cmd = 'bitbake -g -u taskexp_tty zlib acl'
> > +        result = runCmd(cmd)
> > +        self.assertEqual(0, result.status, "Command %s didn't run as expected. \
> > %s" % (cmd, result.output)) +
> > def test_checkuri(self):
> > result = runCmd('bitbake -c checkuri m4')
> > self.assertEqual(0, result.status, msg = "\"checkuri\" task was not executed. \
> > bitbake output: %s" % result.output)
> 
> 
> Thanks for the updated bitbake patch. Since I wanted to ensure there
> weren't regressions in the future I coded this test into OE-Core to
> ensure it was being tested on a regular and ongoing basis.
> Unfortunately it failed on the autobuilders:
> 
> https://autobuilder.yoctoproject.org/typhoon/#/builders/79/builds/3646/steps/15/logs/stdio
>  
> Does that error make any sense to you?
> 
> For reference I've not tested locally myself yet, I just coded the test
> in to see how things went on the infrastructure.

I was thinking about this and whilst I'm guessing, it could be because
we're running this in a CI environment that doesn't have an interactive
terminal? Is there a way we can still test things there?

Cheers,

Richard



-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#166302): https://lists.openembedded.org/g/openembedded-core/message/166302
Mute This Topic: https://lists.openembedded.org/mt/91409238/4454766
Group Owner: openembedded-core+owner@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [openembedded-core@marc.info]
-=-=-=-=-=-=-=-=-=-=-=-



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic