summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/oetest.py
diff options
context:
space:
mode:
authorMariano Lopez <mariano.lopez@linux.intel.com>2016-06-06 07:15:40 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-06-06 22:48:04 +0100
commita26f23d3ce8f7e9f59dbc9bf27516377fd7a0a6d (patch)
tree191b2c53e3d3b3459ea1beb7e7d9ac8e4d11ff0d /meta/lib/oeqa/oetest.py
parent0440b5ace411c61f802376d4e1c9eac93e72d65f (diff)
downloadopenembedded-core-contrib-a26f23d3ce8f7e9f59dbc9bf27516377fd7a0a6d.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] Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/oetest.py')
-rw-r--r--meta/lib/oeqa/oetest.py5
1 files changed, 2 insertions, 3 deletions
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):
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()
@@ -460,7 +459,7 @@ class RuntimeTestContext(TestContext):
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