mirror of
https://git.yoctoproject.org/poky
synced 2026-01-29 21:08:42 +01:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
517bc165bb
commit
724b83d141
@@ -9,6 +9,7 @@ import shutil
|
|||||||
import subprocess
|
import subprocess
|
||||||
import bb
|
import bb
|
||||||
import traceback
|
import traceback
|
||||||
|
import sys
|
||||||
from oeqa.utils.sshcontrol import SSHControl
|
from oeqa.utils.sshcontrol import SSHControl
|
||||||
from oeqa.utils.qemurunner import QemuRunner
|
from oeqa.utils.qemurunner import QemuRunner
|
||||||
from oeqa.controllers.testtargetloader import TestTargetLoader
|
from oeqa.controllers.testtargetloader import TestTargetLoader
|
||||||
@@ -25,7 +26,7 @@ def get_target_controller(d):
|
|||||||
# use the class name
|
# use the class name
|
||||||
try:
|
try:
|
||||||
# is it a core class defined here?
|
# is it a core class defined here?
|
||||||
controller = getattr(__name__, testtarget)
|
controller = getattr(sys.modules[__name__], testtarget)
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
# nope, perhaps a layer defined one
|
# nope, perhaps a layer defined one
|
||||||
try:
|
try:
|
||||||
|
|||||||
Reference in New Issue
Block a user