[oe-commits] [openembedded-core] 17/18: oeqa/core/loader: Call parent init method in OETestLoader

git at git.openembedded.org git at git.openembedded.org
Mon Jun 5 15:57:53 UTC 2017


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit 614b62621e9a6a352e4416752b816ab26a89e7a9
Author: Anibal Limon <anibal.limon at linux.intel.com>
AuthorDate: Mon Jun 5 04:39:08 2017 -0400

    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'
    
    Signed-off-by: Anibal Limon <anibal.limon at linux.intel.com>
---
 meta/lib/oeqa/core/loader.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/lib/oeqa/core/loader.py b/meta/lib/oeqa/core/loader.py
index 51bfd9d..7cc4d4c 100644
--- a/meta/lib/oeqa/core/loader.py
+++ b/meta/lib/oeqa/core/loader.py
@@ -109,6 +109,8 @@ class OETestLoader(unittest.TestLoader):
 
         self._patchCaseClass(self.caseClass)
 
+        super(OETestLoader, self).__init__()
+
     def _patchCaseClass(self, testCaseClass):
         # Adds custom attributes to the OETestCase class
         setattr(testCaseClass, 'tc', self.tc)

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list