summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnibal Limon <anibal.limon@linux.intel.com>2017-06-05 04:39:08 -0400
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-06-06 19:02:44 +0100
commitcfa8245e0e057db5bc3de2b4acbc783c28ec7c73 (patch)
tree53edca3119fdebbb9637489e6c5b7137b0624f43
parentd95700ff6e175c7ff254583d198ed628768be004 (diff)
downloadpoky-cfa8245e0e057db5bc3de2b4acbc783c28ec7c73.tar.gz
oeqa/core/loader: Call parent init method in OETestLoader
After Python 3.5 the init method contains initialization of _loading_packages set to avoid infinite loops in recursive loading. Fix, Traceback (most recent call last): File "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/scripts/oe-selftest", line 70, in <module> ret = main() File "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/scripts/oe-selftest", line 57, in main results = args.func(logger, args) File "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/meta/lib/oeqa/selftest/context.py", line 214, in run rc = self._internal_run(logger, args) File "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/meta/lib/oeqa/selftest/context.py", line 175, in _internal_run self.tc.loadTests(self.module_paths, **self.tc_kwargs['load']) File "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/meta/lib/oeqa/core/context.py", line 51, in loadTests self.suites = self.loader.discover() File "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/meta/lib/oeqa/core/loader.py", line 268, in discover pattern='*.py', top_level_dir=path) File "/usr/lib/python3.5/unittest/loader.py", line 341, in discover tests = list(self._find_tests(start_dir, pattern)) File "/usr/lib/python3.5/unittest/loader.py", line 398, in _find_tests full_path, pattern, namespace) File "/usr/lib/python3.5/unittest/loader.py", line 473, in _find_test_path self._loading_packages.add(name) AttributeError: 'OETestLoader' object has no attribute '_loading_packages' (From OE-Core rev: 17b832ba05d640570a773adbff2fa4e9ff83fce3) Signed-off-by: Anibal Limon <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/lib/oeqa/core/loader.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/meta/lib/oeqa/core/loader.py b/meta/lib/oeqa/core/loader.py
index 51bfd9de01..7cc4d4c0cf 100644
--- a/meta/lib/oeqa/core/loader.py
+++ b/meta/lib/oeqa/core/loader.py
@@ -109,6 +109,8 @@ class OETestLoader(unittest.TestLoader):
109 109
110 self._patchCaseClass(self.caseClass) 110 self._patchCaseClass(self.caseClass)
111 111
112 super(OETestLoader, self).__init__()
113
112 def _patchCaseClass(self, testCaseClass): 114 def _patchCaseClass(self, testCaseClass):
113 # Adds custom attributes to the OETestCase class 115 # Adds custom attributes to the OETestCase class
114 setattr(testCaseClass, 'tc', self.tc) 116 setattr(testCaseClass, 'tc', self.tc)