diff options
author | Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> | 2017-05-26 15:37:51 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-06-02 13:36:14 +0100 |
commit | 542831e3d5ac153523ce280485a03a4531a865c0 (patch) | |
tree | a5946e37eda6be0cac1088e1f35ff89de37f0fb5 | |
parent | dedb6ba63bea7bdbd78f68701e273a1a9fcaae61 (diff) | |
download | poky-542831e3d5ac153523ce280485a03a4531a865c0.tar.gz |
oeqa/core/context: Use a default iterable modules object
The OETestLoader.modules must be an iterable object, otherwise
checking presence of specific modules with the 'in' operator fails
with the following command/error:
% oe-test core
.. - core - INFO - Running bitbake -p
Traceback (most recent call last):
File "..poky2/scripts/oe-test", line 108, in <module>
ret = main()
File "..poky2/scripts/oe-test", line 93, in main
results = args.func(logger, args)
File "..poky2/meta/lib/oeqa/core/context.py", line 235, in run
self.tc.loadTests(self.module_paths, **self.tc_kwargs['load'])
File "..poky2/meta/lib/oeqa/core/context.py", line 53, in loadTests
self.suites = self.loader.discover()
File "..poky2/meta/lib/oeqa/core/loader.py", line 204, in discover
pattern='*.py', top_level_dir=path)
File "/usr/lib64/python3.4/unittest/loader.py", line 275, in discover
tests = list(self._find_tests(start_dir, pattern))
File "/usr/lib64/python3.4/unittest/loader.py", line 339, in _find_tests
yield self.loadTestsFromModule(module)
File "..poky2/meta/lib/oeqa/core/loader.py", line 266, in loadTestsFromModule
and module.__name__ in self.modules \
TypeError: argument of type 'NoneType' is not iterable
(From OE-Core rev: 2bb02cd3d6ec6c2c22ab6b567e2985015655fae6)
Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/lib/oeqa/core/context.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/lib/oeqa/core/context.py b/meta/lib/oeqa/core/context.py index 1ac28788fa..20d82360e6 100644 --- a/meta/lib/oeqa/core/context.py +++ b/meta/lib/oeqa/core/context.py | |||
@@ -139,7 +139,7 @@ class OETestContextExecutor(object): | |||
139 | if args.run_tests: | 139 | if args.run_tests: |
140 | self.tc_kwargs['load']['modules'] = args.run_tests | 140 | self.tc_kwargs['load']['modules'] = args.run_tests |
141 | else: | 141 | else: |
142 | self.tc_kwargs['load']['modules'] = None | 142 | self.tc_kwargs['load']['modules'] = [] |
143 | 143 | ||
144 | self.module_paths = args.CASES_PATHS | 144 | self.module_paths = args.CASES_PATHS |
145 | 145 | ||