]> code.ossystems Code Review - openembedded-core.git/commit
oeqa/core/loader: Call parent init method in OETestLoader
authorAnibal Limon <anibal.limon@linux.intel.com>
Mon, 5 Jun 2017 08:39:08 +0000 (04:39 -0400)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 5 Jun 2017 16:59:40 +0000 (17:59 +0100)
commit17b832ba05d640570a773adbff2fa4e9ff83fce3
tree8f0a51509bf926b89821edf7d6daa26e010eb080
parent7fe4c074611eb21abdf811d8f216d4df7ab6a3ea
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@linux.intel.com>
meta/lib/oeqa/core/loader.py