[OE-core] [PATCHv2 1/3] runtime/cases/ptest.py: do not require ptest-pkgs in IMAGE_FEATURES

Cal Sullivan california.l.sullivan at intel.com
Wed Jan 3 20:42:31 UTC 2018


Looks like it doesn't skip the test correctly:

| NOTE: test_ptestrunner (ptest.PtestRunnerTest) | DEBUG: Checking if 
ptest is in DISTRO_FEATURES or IMAGE_FEATURES | DEBUG: [Running]$ ssh -l 
root -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o 
LogLevel=ERROR 192.168.7.2 export PATH=/usr/sbin:/sbin:/usr/bin:/bin; 
which ptest-runner | DEBUG: Data from SSH call: which: no ptest-runner 
in (/usr/sbin:/sbin:/usr/bin:/bin) | DEBUG: [Command returned '1' after 
0.10 seconds] | DEBUG: Command: which ptest-runner | Output: which: no 
ptest-runner in (/usr/sbin:/sbin:/usr/bin:/bin) | | DEBUG: [Running]$ 
ssh -l root -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no 
-o LogLevel=ERROR 192.168.7.2 export PATH=/usr/sbin:/sbin:/usr/bin:/bin; 
ptest-runner | DEBUG: Data from SSH call: sh: ptest-runner: command not 
found | DEBUG: [Command returned '127' after 0.10 seconds] | DEBUG: 
Command: ptest-runner | Output: sh: ptest-runner: command not found | | 
NOTE: ... FAIL 
https://autobuilder.yocto.io/builders/nightly-deb-non-deb/builds/673/steps/Running%20Sanity%20Tests/logs/stdio 
Thanks, Cal

On 12/21/2017 04:44 AM, Alexander Kanavin wrote:
> Doing so means that all available ptests for packages in the image
> will be installed and run; some of them may be broken, never finish,
> take a very long time or simply irrelevant to the user who wants to
> check ptests of only a few specific packages, and does so by listing
> them explicitly via IMAGE_INSTALL_append or similar.
>
> Conversely, do not run the test if ptest-runner is not installed
> (which means there are no ptests available, as they pull it in via a
> dependency).
>
> Signed-off-by: Alexander Kanavin <alexander.kanavin at linux.intel.com>
> ---
>   meta/lib/oeqa/runtime/cases/ptest.py | 5 ++++-
>   1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/meta/lib/oeqa/runtime/cases/ptest.py b/meta/lib/oeqa/runtime/cases/ptest.py
> index ec8c038a566..63e119530dc 100644
> --- a/meta/lib/oeqa/runtime/cases/ptest.py
> +++ b/meta/lib/oeqa/runtime/cases/ptest.py
> @@ -48,9 +48,12 @@ class PtestRunnerTest(OERuntimeTestCase):
>   
>       @OETestID(1600)
>       @skipIfNotFeature('ptest', 'Test requires ptest to be in DISTRO_FEATURES')
> -    @skipIfNotFeature('ptest-pkgs', 'Test requires ptest-pkgs to be in IMAGE_FEATURES')
>       @OETestDepends(['ssh.SSHTest.test_ssh'])
>       def test_ptestrunner(self):
> +        status, output = self.target.run('which ptest-runner', 0)
> +        if len(output) == 0:
> +            self.skipTest("No -ptest packages are installed in the image")
> +
>           import datetime
>   
>           test_log_dir = self.td.get('TEST_LOG_DIR', '')

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20180103/d590fd20/attachment-0002.html>


More information about the Openembedded-core mailing list