[OE-core] [oe-core][PATCH 1/1] oeqa: small modification to oe_syslog

Slater, Joseph joe.slater at windriver.com
Fri Jul 26 00:52:50 UTC 2019


I thought of that, but I think the package might be variable and we would have to list all the possibles, which requires monitoring.  If "logger" isn't on the path, we could take the position that the test is pointless and not worry about where it might have come from.

Joe

-----Original Message-----
From: Richard Purdie <richard.purdie at linuxfoundation.org> 
Sent: Thursday, July 25, 2019 2:45 PM
To: Slater, Joseph <joe.slater at windriver.com>; openembedded-core at lists.openembedded.org
Subject: Re: [OE-core] [oe-core][PATCH 1/1] oeqa: small modification to oe_syslog

On Thu, 2019-07-25 at 13:30 -0700, Joe Slater wrote:
> Skip logger test if logger is not a command.
> 
> Signed-off-by: Joe Slater <joe.slater at windriver.com>
> ---
>  meta/lib/oeqa/runtime/cases/oe_syslog.py | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/meta/lib/oeqa/runtime/cases/oe_syslog.py 
> b/meta/lib/oeqa/runtime/cases/oe_syslog.py
> index 3a8271a..04f8345 100644
> --- a/meta/lib/oeqa/runtime/cases/oe_syslog.py
> +++ b/meta/lib/oeqa/runtime/cases/oe_syslog.py
> @@ -83,6 +83,8 @@ class SyslogTestConfig(OERuntimeTestCase):
>      def test_syslog_logger(self):
>          status, output = self.target.run('logger foobar')
>          msg = "Can't log into syslog. Output: %s " % output
> +        if status == 127:
> +            self.skipTest("We cannot test logger because it is not 
> + there.")
>          self.assertEqual(status, 0, msg=msg)
>  
>          # There is no way to flush the logger to disk in all cases

Should we not be marking up the test to skip if the appropriate package isn't in the image?

Cheers,

Richard



More information about the Openembedded-core mailing list