aboutsummaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/runtime
diff options
context:
space:
mode:
authorMariano Lopez <mariano.lopez@linux.intel.com>2017-02-21 10:11:00 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-02-23 12:29:10 -0800
commitcf138029a1f18f991fc7a28c81d85884942e9d56 (patch)
treef5d01090bfd7645563820fdb580361c42a40b8a2 /meta/lib/oeqa/runtime
parent9d25188e873645b849584b51a77b86588a51d4ba (diff)
downloadopenembedded-core-contrib-cf138029a1f18f991fc7a28c81d85884942e9d56.tar.gz
oeqa/runtime/context.py: Fix use of getTarget() with testexport
The idea on getTarget is to use kwargs to send custom variables to different targets, instead of this, a new variable was added (just used for custom targets) and this broke testexport. So in order to fix it, just add the custom variable to kwargs. This fixes the use of getTarget() in testexport class that was introduced in 1dc8010afd71fe46fb28bb86fb7c07a5fbd3d7cf. Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/lib/oeqa/runtime')
-rw-r--r--meta/lib/oeqa/runtime/context.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/meta/lib/oeqa/runtime/context.py b/meta/lib/oeqa/runtime/context.py
index ea1b4a643e..c4cd76cf44 100644
--- a/meta/lib/oeqa/runtime/context.py
+++ b/meta/lib/oeqa/runtime/context.py
@@ -89,7 +89,7 @@ class OERuntimeTestContextExecutor(OETestContextExecutor):
help="Qemu boot configuration, only needed when target_type is QEMU.")
@staticmethod
- def getTarget(target_type, target_modules_path, logger, target_ip, server_ip, **kwargs):
+ def getTarget(target_type, logger, target_ip, server_ip, **kwargs):
target = None
if target_type == 'simpleremote':
@@ -97,8 +97,17 @@ class OERuntimeTestContextExecutor(OETestContextExecutor):
elif target_type == 'qemu':
target = OEQemuTarget(logger, target_ip, server_ip, **kwargs)
else:
+ # XXX: This code uses the old naming convention for controllers and
+ # targets, the idea it is to leave just targets as the controller
+ # most of the time was just a wrapper.
+ # XXX: This code tries to import modules from lib/oeqa/controllers
+ # directory and treat them as controllers, it will less error prone
+ # to use introspection to load such modules.
+ # XXX: Don't base your targets on this code it will be refactored
+ # in the near future.
# Custom target module loading
try:
+ target_modules_path = kwargs.get('target_modules_path', '')
controller = OERuntimeTestContextExecutor.getControllerModule(target_type, target_modules_path)
target = controller(logger, target_ip, server_ip, **kwargs)
except ImportError as e: