oeqa/selftest/bbtests: Add taskexp_tty UI test
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hi David,
Quoted 11 lines · Richard Purdie via lists.openembedded.org
Signed-off-by Richard Purdie <[email protected]>--- meta/lib/oeqa/selftest/cases/bbtests.py | 5 +++++ 1 file changed, 5 insertions(+)meta/lib/oeqa/selftest/cases/bbtests.py +0
-0@@ -205,6 +205,11 @@ SSTATE_DIR = \"${TOPDIR}/download-selftest\" result = runCmd('bitbake -R conf/postfile.conf -e | grep TEST_POSTFILE=')
meta/lib/oeqa/selftest/cases/bbtests.py SSTATE_DIR = \"${TOPDIR}/download-selftest\" · line 215
Quoted 10 lines
meta/lib/oeqa/selftest/cases/bbtests.py +5
-0self.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.
Cheers,
Richard
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 32 lines · Richard Purdie via lists.openembedded.org
Hi David,
Quoted 11 lines · Richard Purdie via lists.openembedded.org
Signed-off-by Richard Purdie <[email protected]>--- meta/lib/oeqa/selftest/cases/bbtests.py | 5 +++++ 1 file changed, 5 insertions(+)meta/lib/oeqa/selftest/cases/bbtests.py +0
-0@@ -205,6 +205,11 @@ SSTATE_DIR = \"${TOPDIR}/download-selftest\" result = runCmd('bitbake -R conf/postfile.conf -e | grep TEST_POSTFILE=')meta/lib/oeqa/selftest/cases/bbtests.py SSTATE_DIR = \"${TOPDIR}/download-selftest\" · line 215
Quoted 10 lines
meta/lib/oeqa/selftest/cases/bbtests.py +5
-0self.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:
Quoted 6 lines
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
Hi Richard,
Quoted 1 line
"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: [email protected] <[email protected]>
Sent: Sunday, May 29, 2022 5:44 AM
To: [email protected]
Cc: Reyna, David <[email protected]>
Subject: Re: [OE-core] [PATCH] oeqa/selftest/bbtests: Add taskexp_tty UI test
Quoted 32 lines · Richard Purdie via lists.openembedded.org
Hi David,
Quoted 11 lines · Richard Purdie via lists.openembedded.org
Signed-off-by Richard Purdie <[email protected]>--- meta/lib/oeqa/selftest/cases/bbtests.py | 5 +++++ 1 file changed, 5 insertions(+)meta/lib/oeqa/selftest/cases/bbtests.py +0
-0@@ -205,6 +205,11 @@ SSTATE_DIR = \"${TOPDIR}/download-selftest\" result = runCmd('bitbake -R conf/postfile.conf -e | grep TEST_POSTFILE=')meta/lib/oeqa/selftest/cases/bbtests.py SSTATE_DIR = \"${TOPDIR}/download-selftest\" · line 215
Quoted 10 lines
meta/lib/oeqa/selftest/cases/bbtests.py +5
-0self.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:
Quoted 6 lines
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
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: [email protected]; [email protected]
Subject: RE: [OE-core] [PATCH] oeqa/selftest/bbtests: Add taskexp_tty UI test
Hi Richard,
Quoted 1 line
"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: [email protected] <[email protected]>
Sent: Sunday, May 29, 2022 5:44 AM
To: [email protected]
Cc: Reyna, David <[email protected]>
Subject: Re: [OE-core] [PATCH] oeqa/selftest/bbtests: Add taskexp_tty UI test
Quoted 32 lines · Richard Purdie via lists.openembedded.org
Hi David,
Quoted 11 lines · Richard Purdie via lists.openembedded.org
Signed-off-by Richard Purdie <[email protected]>--- meta/lib/oeqa/selftest/cases/bbtests.py | 5 +++++ 1 file changed, 5 insertions(+)meta/lib/oeqa/selftest/cases/bbtests.py +0
-0@@ -205,6 +205,11 @@ SSTATE_DIR = \"${TOPDIR}/download-selftest\" result = runCmd('bitbake -R conf/postfile.conf -e | grep TEST_POSTFILE=')meta/lib/oeqa/selftest/cases/bbtests.py SSTATE_DIR = \"${TOPDIR}/download-selftest\" · line 215
Quoted 10 lines
meta/lib/oeqa/selftest/cases/bbtests.py +5
-0self.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:
Quoted 6 lines
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