diff options
author | Stefan Stanacar <stefanx.stanacar@intel.com> | 2014-03-07 11:34:05 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-03-11 08:11:41 -0700 |
commit | 724b83d141e33b1d870dbf8210a714a0b118bd04 (patch) | |
tree | a10f2524116c4f9d222c8d5370b7d6f5a78c6598 /meta/lib/oeqa/targetcontrol.py | |
parent | 517bc165bb96cfc62da8fde23abc315981941d49 (diff) | |
download | poky-724b83d141e33b1d870dbf8210a714a0b118bd04.tar.gz |
oeqa/targetcontrol: fix loading a controller using a class name
This was wrong and if one would do TEST_TARGET = "SimpleRemoteTarget"
instead of TEST_TARGET = "simpleremote" it would complain
that there is no such controller when there is.
(From OE-Core rev: 47d2049d13ab71e0310e9eedaf307d6c3e530b44)
Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/targetcontrol.py')
-rw-r--r-- | meta/lib/oeqa/targetcontrol.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/meta/lib/oeqa/targetcontrol.py b/meta/lib/oeqa/targetcontrol.py index 17871f5707..873a66457a 100644 --- a/meta/lib/oeqa/targetcontrol.py +++ b/meta/lib/oeqa/targetcontrol.py | |||
@@ -9,6 +9,7 @@ import shutil | |||
9 | import subprocess | 9 | import subprocess |
10 | import bb | 10 | import bb |
11 | import traceback | 11 | import traceback |
12 | import sys | ||
12 | from oeqa.utils.sshcontrol import SSHControl | 13 | from oeqa.utils.sshcontrol import SSHControl |
13 | from oeqa.utils.qemurunner import QemuRunner | 14 | from oeqa.utils.qemurunner import QemuRunner |
14 | from oeqa.controllers.testtargetloader import TestTargetLoader | 15 | from oeqa.controllers.testtargetloader import TestTargetLoader |
@@ -25,7 +26,7 @@ def get_target_controller(d): | |||
25 | # use the class name | 26 | # use the class name |
26 | try: | 27 | try: |
27 | # is it a core class defined here? | 28 | # is it a core class defined here? |
28 | controller = getattr(__name__, testtarget) | 29 | controller = getattr(sys.modules[__name__], testtarget) |
29 | except AttributeError: | 30 | except AttributeError: |
30 | # nope, perhaps a layer defined one | 31 | # nope, perhaps a layer defined one |
31 | try: | 32 | try: |