summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/classes/testexport.bbclass10
-rw-r--r--meta/lib/oeqa/__init__.py0
-rw-r--r--meta/lib/oeqa/oetest.py5
-rw-r--r--meta/lib/oeqa/runtime/__init__.py3
4 files changed, 8 insertions, 10 deletions
diff --git a/meta/classes/testexport.bbclass b/meta/classes/testexport.bbclass
index 51b7d93d2b..c86eaac197 100644
--- a/meta/classes/testexport.bbclass
+++ b/meta/classes/testexport.bbclass
@@ -96,11 +96,13 @@ def exportTests(d,tc):
96 shutil.copytree(foldername, target_folder) 96 shutil.copytree(foldername, target_folder)
97 if not isfolder: 97 if not isfolder:
98 shutil.copy2(mod.path, os.path.join(exportpath, "oeqa/runtime")) 98 shutil.copy2(mod.path, os.path.join(exportpath, "oeqa/runtime"))
99 # copy __init__.py files 99 # Get meta layer
100 oeqadir = os.path.dirname(pkgutil.get_loader("oeqa").path) 100 for layer in d.getVar("BBLAYERS", True).split():
101 shutil.copy2(os.path.join(oeqadir, "__init__.py"), os.path.join(exportpath, "oeqa")) 101 if os.path.basename(layer) == "meta":
102 shutil.copy2(os.path.join(oeqadir, "runtime/__init__.py"), os.path.join(exportpath, "oeqa/runtime")) 102 meta_layer = layer
103 break
103 # copy oeqa/oetest.py and oeqa/runexported.py 104 # copy oeqa/oetest.py and oeqa/runexported.py
105 oeqadir = os.path.join(meta_layer, "lib/oeqa")
104 shutil.copy2(os.path.join(oeqadir, "oetest.py"), os.path.join(exportpath, "oeqa")) 106 shutil.copy2(os.path.join(oeqadir, "oetest.py"), os.path.join(exportpath, "oeqa"))
105 shutil.copy2(os.path.join(oeqadir, "runexported.py"), exportpath) 107 shutil.copy2(os.path.join(oeqadir, "runexported.py"), exportpath)
106 # copy oeqa/utils/*.py 108 # copy oeqa/utils/*.py
diff --git a/meta/lib/oeqa/__init__.py b/meta/lib/oeqa/__init__.py
deleted file mode 100644
index e69de29bb2..0000000000
--- a/meta/lib/oeqa/__init__.py
+++ /dev/null
diff --git a/meta/lib/oeqa/oetest.py b/meta/lib/oeqa/oetest.py
index b4cf34b720..819f95987b 100644
--- a/meta/lib/oeqa/oetest.py
+++ b/meta/lib/oeqa/oetest.py
@@ -203,8 +203,7 @@ class TestContext(object):
203 self.testslist = self._get_tests_list(path, extrapath) 203 self.testslist = self._get_tests_list(path, extrapath)
204 self.testsrequired = self._get_test_suites_required() 204 self.testsrequired = self._get_test_suites_required()
205 205
206 self.filesdir = os.path.join(os.path.dirname(os.path.abspath( 206 self.filesdir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "runtime/files")
207 oeqa.runtime.__file__)), "files")
208 self.imagefeatures = d.getVar("IMAGE_FEATURES", True).split() 207 self.imagefeatures = d.getVar("IMAGE_FEATURES", True).split()
209 self.distrofeatures = d.getVar("DISTRO_FEATURES", True).split() 208 self.distrofeatures = d.getVar("DISTRO_FEATURES", True).split()
210 209
@@ -460,7 +459,7 @@ class RuntimeTestContext(TestContext):
460 Returns the path of the JSON file for a module, empty if doesn't exitst. 459 Returns the path of the JSON file for a module, empty if doesn't exitst.
461 """ 460 """
462 461
463 module_file = module.filename 462 module_file = module.path
464 json_file = "%s.json" % module_file.rsplit(".", 1)[0] 463 json_file = "%s.json" % module_file.rsplit(".", 1)[0]
465 if os.path.isfile(module_file) and os.path.isfile(json_file): 464 if os.path.isfile(module_file) and os.path.isfile(json_file):
466 return json_file 465 return json_file
diff --git a/meta/lib/oeqa/runtime/__init__.py b/meta/lib/oeqa/runtime/__init__.py
deleted file mode 100644
index 4cf3fa76b6..0000000000
--- a/meta/lib/oeqa/runtime/__init__.py
+++ /dev/null
@@ -1,3 +0,0 @@
1# Enable other layers to have tests in the same named directory
2from pkgutil import extend_path
3__path__ = extend_path(__path__, __name__)