diff options
author | Mariano Lopez <mariano.lopez@linux.intel.com> | 2016-06-06 07:15:40 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-06-07 15:22:38 +0100 |
commit | d9b3ee8b38f877c1723e48f1aa311c28102786fb (patch) | |
tree | 5ba5ad84fbda7d3de15c10ff73105ea9f8565826 /meta/lib | |
parent | 84441a96f0d369634c4a777ba3bc135a9893fc95 (diff) | |
download | poky-d9b3ee8b38f877c1723e48f1aa311c28102786fb.tar.gz |
lib/oeqa/otest.py: Fix import tests from other layers with python3
In python3 the functionality to import modules has been changed and
this broke the capability to add runtime tests from other layers.
This commit returns this capability to testimage and testexport.
[YOCTO #9705]
(From OE-Core rev: a26f23d3ce8f7e9f59dbc9bf27516377fd7a0a6d)
Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r-- | meta/lib/oeqa/__init__.py | 0 | ||||
-rw-r--r-- | meta/lib/oeqa/oetest.py | 5 | ||||
-rw-r--r-- | meta/lib/oeqa/runtime/__init__.py | 3 |
3 files changed, 2 insertions, 6 deletions
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 | ||
2 | from pkgutil import extend_path | ||
3 | __path__ = extend_path(__path__, __name__) | ||