Skip to contentSkip to conversation

oetest.py: Remove check for __init__.py

PATCH New [email protected] 1 participant 1 message Jul 22, 2016 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH 1/1 oetest.py: Remove check for __init__.py

From: Mariano Lopez <[email protected]>

When using "auto" in TEST_SUITES there is a check for __init__.py in the <layer>/lib/oeqa/runtime/ directory in all the layers in BBLAYERS.

This check was needed because the way that python 2 import the modules, now that bitbake uses python 3 there is no need these __init__.py files, moreover these files won't allow to import tests from other layers.

This patch removes the check.

[YOCTO #9996]

---
 meta/lib/oeqa/oetest.py | 2 --
 1 file changed, 2 deletions(-)
meta/lib/oeqa/oetest.py +0 -2
index e63ca56..b64a343 100644
@@ -265,8 +265,6 @@ class TestContext(object):
 
         if "auto" in self.testsuites:
             def add_auto_list(path):
-                if not os.path.exists(os.path.join(path, '__init__.py')):
-                    bb.fatal('Tests directory %s exists but is missing __init__.py' % path)
                 files = sorted([f for f in os.listdir(path) if f.endswith('.py') and not f.startswith('_')])
                 for f in files:
                     module = 'oeqa.' + type + '.' + f[:-3]
Signature · 1 line
2.6.6