shutil.copytree(foldername, target_folder)
if not isfolder:
shutil.copy2(mod.path, os.path.join(exportpath, "oeqa/runtime"))
- # copy __init__.py files
- oeqadir = os.path.dirname(pkgutil.get_loader("oeqa").path)
- shutil.copy2(os.path.join(oeqadir, "__init__.py"), os.path.join(exportpath, "oeqa"))
- shutil.copy2(os.path.join(oeqadir, "runtime/__init__.py"), os.path.join(exportpath, "oeqa/runtime"))
+ # Get meta layer
+ for layer in d.getVar("BBLAYERS", True).split():
+ if os.path.basename(layer) == "meta":
+ meta_layer = layer
+ break
# copy oeqa/oetest.py and oeqa/runexported.py
+ oeqadir = os.path.join(meta_layer, "lib/oeqa")
shutil.copy2(os.path.join(oeqadir, "oetest.py"), os.path.join(exportpath, "oeqa"))
shutil.copy2(os.path.join(oeqadir, "runexported.py"), exportpath)
# copy oeqa/utils/*.py
self.testslist = self._get_tests_list(path, extrapath)
self.testsrequired = self._get_test_suites_required()
- self.filesdir = os.path.join(os.path.dirname(os.path.abspath(
- oeqa.runtime.__file__)), "files")
+ self.filesdir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "runtime/files")
self.imagefeatures = d.getVar("IMAGE_FEATURES", True).split()
self.distrofeatures = d.getVar("DISTRO_FEATURES", True).split()
Returns the path of the JSON file for a module, empty if doesn't exitst.
"""
- module_file = module.filename
+ module_file = module.path
json_file = "%s.json" % module_file.rsplit(".", 1)[0]
if os.path.isfile(module_file) and os.path.isfile(json_file):
return json_file
+++ /dev/null
-# Enable other layers to have tests in the same named directory
-from pkgutil import extend_path
-__path__ = extend_path(__path__, __name__)