]> code.ossystems Code Review - openembedded-core.git/commitdiff
oeqa/core/decorator/data.py: fix skipIfNotInDataVar
authorChen Qi <Qi.Chen@windriver.com>
Fri, 1 Jun 2018 05:03:05 +0000 (13:03 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 4 Jun 2018 14:14:43 +0000 (15:14 +0100)
The var might not be set, resulting in unexpected error.

  RESULTS - multilib.MultilibTest.test_check_multilib_libc - Testcase 1593: ERROR

The above error is due to MULTILIBS being not set, which is the default
for OE. This patch fixes this problem.

Also, the debugging message in skipIfNotInDataVar is currently confusing.
Instead of
DEBUG: Checking if 'MULTILIBS' value is in 'multilib:lib32' to run the test
it should be
DEBUG: Checking if 'MULTILIBS' value contains 'multilib:lib32' to run the test

This patch also fixes it.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/core/decorator/data.py

index ff7bdd98b7fefd82d08f698b72bf3a61b376ae0d..31c6dd6be7d3ef11442b8f1b86ec87c9edac1511 100644 (file)
@@ -61,10 +61,10 @@ class skipIfNotInDataVar(OETestDecorator):
 
     attrs = ('var', 'value', 'msg')
     def setUpDecorator(self):
-        msg = ('Checking if %r value is in %r to run '
+        msg = ('Checking if %r value contains %r to run '
               'the test' % (self.var, self.value))
         self.logger.debug(msg)
-        if not self.value in self.case.td.get(self.var):
+        if not self.value in (self.case.td.get(self.var) or ""):
             self.case.skipTest(self.msg)
 
 @registerDecorator