summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/controllers
diff options
context:
space:
mode:
authorJoshua Lock <joshua.g.lock@intel.com>2016-12-14 21:13:04 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-12-16 10:23:23 +0000
commitc4e2c59088765d1f1de7ec57cde91980f887c2ff (patch)
treea2fda8ac5916fb59a711e9220c2177008cca9347 /meta/lib/oeqa/controllers
parentd5e67725ac11e3296cad104470931ffa16824b90 (diff)
downloadpoky-c4e2c59088765d1f1de7ec57cde91980f887c2ff.tar.gz
meta: remove True option to getVar calls
getVar() now defaults to expanding by default, thus remove the True option from getVar() calls with a regex search and replace. Search made with the following regex: getVar ?\(( ?[^,()]*), True\) (From OE-Core rev: 7c552996597faaee2fbee185b250c0ee30ea3b5f) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/controllers')
-rw-r--r--meta/lib/oeqa/controllers/masterimage.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/meta/lib/oeqa/controllers/masterimage.py b/meta/lib/oeqa/controllers/masterimage.py
index 9ce3bf803d..d796fc3c30 100644
--- a/meta/lib/oeqa/controllers/masterimage.py
+++ b/meta/lib/oeqa/controllers/masterimage.py
@@ -32,14 +32,14 @@ class MasterImageHardwareTarget(oeqa.targetcontrol.BaseTarget, metaclass=ABCMeta
32 super(MasterImageHardwareTarget, self).__init__(d) 32 super(MasterImageHardwareTarget, self).__init__(d)
33 33
34 # target ip 34 # target ip
35 addr = d.getVar("TEST_TARGET_IP", True) or bb.fatal('Please set TEST_TARGET_IP with the IP address of the machine you want to run the tests on.') 35 addr = d.getVar("TEST_TARGET_IP") or bb.fatal('Please set TEST_TARGET_IP with the IP address of the machine you want to run the tests on.')
36 self.ip = addr.split(":")[0] 36 self.ip = addr.split(":")[0]
37 try: 37 try:
38 self.port = addr.split(":")[1] 38 self.port = addr.split(":")[1]
39 except IndexError: 39 except IndexError:
40 self.port = None 40 self.port = None
41 bb.note("Target IP: %s" % self.ip) 41 bb.note("Target IP: %s" % self.ip)
42 self.server_ip = d.getVar("TEST_SERVER_IP", True) 42 self.server_ip = d.getVar("TEST_SERVER_IP")
43 if not self.server_ip: 43 if not self.server_ip:
44 try: 44 try:
45 self.server_ip = subprocess.check_output(['ip', 'route', 'get', self.ip ]).split("\n")[0].split()[-1] 45 self.server_ip = subprocess.check_output(['ip', 'route', 'get', self.ip ]).split("\n")[0].split()[-1]
@@ -49,8 +49,8 @@ class MasterImageHardwareTarget(oeqa.targetcontrol.BaseTarget, metaclass=ABCMeta
49 49
50 # test rootfs + kernel 50 # test rootfs + kernel
51 self.image_fstype = self.get_image_fstype(d) 51 self.image_fstype = self.get_image_fstype(d)
52 self.rootfs = os.path.join(d.getVar("DEPLOY_DIR_IMAGE", True), d.getVar("IMAGE_LINK_NAME", True) + '.' + self.image_fstype) 52 self.rootfs = os.path.join(d.getVar("DEPLOY_DIR_IMAGE"), d.getVar("IMAGE_LINK_NAME") + '.' + self.image_fstype)
53 self.kernel = os.path.join(d.getVar("DEPLOY_DIR_IMAGE", True), d.getVar("KERNEL_IMAGETYPE", False) + '-' + d.getVar('MACHINE', False) + '.bin') 53 self.kernel = os.path.join(d.getVar("DEPLOY_DIR_IMAGE"), d.getVar("KERNEL_IMAGETYPE", False) + '-' + d.getVar('MACHINE', False) + '.bin')
54 if not os.path.isfile(self.rootfs): 54 if not os.path.isfile(self.rootfs):
55 # we could've checked that IMAGE_FSTYPES contains tar.gz but the config for running testimage might not be 55 # we could've checked that IMAGE_FSTYPES contains tar.gz but the config for running testimage might not be
56 # the same as the config with which the image was build, ie 56 # the same as the config with which the image was build, ie
@@ -64,16 +64,16 @@ class MasterImageHardwareTarget(oeqa.targetcontrol.BaseTarget, metaclass=ABCMeta
64 # master ssh connection 64 # master ssh connection
65 self.master = None 65 self.master = None
66 # if the user knows what they are doing, then by all means... 66 # if the user knows what they are doing, then by all means...
67 self.user_cmds = d.getVar("TEST_DEPLOY_CMDS", True) 67 self.user_cmds = d.getVar("TEST_DEPLOY_CMDS")
68 self.deploy_cmds = None 68 self.deploy_cmds = None
69 69
70 # this is the name of the command that controls the power for a board 70 # this is the name of the command that controls the power for a board
71 # e.g: TEST_POWERCONTROL_CMD = "/home/user/myscripts/powercontrol.py ${MACHINE} what-ever-other-args-the-script-wants" 71 # e.g: TEST_POWERCONTROL_CMD = "/home/user/myscripts/powercontrol.py ${MACHINE} what-ever-other-args-the-script-wants"
72 # the command should take as the last argument "off" and "on" and "cycle" (off, on) 72 # the command should take as the last argument "off" and "on" and "cycle" (off, on)
73 self.powercontrol_cmd = d.getVar("TEST_POWERCONTROL_CMD", True) or None 73 self.powercontrol_cmd = d.getVar("TEST_POWERCONTROL_CMD") or None
74 self.powercontrol_args = d.getVar("TEST_POWERCONTROL_EXTRA_ARGS", False) or "" 74 self.powercontrol_args = d.getVar("TEST_POWERCONTROL_EXTRA_ARGS", False) or ""
75 75
76 self.serialcontrol_cmd = d.getVar("TEST_SERIALCONTROL_CMD", True) or None 76 self.serialcontrol_cmd = d.getVar("TEST_SERIALCONTROL_CMD") or None
77 self.serialcontrol_args = d.getVar("TEST_SERIALCONTROL_EXTRA_ARGS", False) or "" 77 self.serialcontrol_args = d.getVar("TEST_SERIALCONTROL_EXTRA_ARGS", False) or ""
78 78
79 self.origenv = os.environ 79 self.origenv = os.environ
@@ -82,7 +82,7 @@ class MasterImageHardwareTarget(oeqa.targetcontrol.BaseTarget, metaclass=ABCMeta
82 # ssh + keys means we need the original user env 82 # ssh + keys means we need the original user env
83 bborigenv = d.getVar("BB_ORIGENV", False) or {} 83 bborigenv = d.getVar("BB_ORIGENV", False) or {}
84 for key in bborigenv: 84 for key in bborigenv:
85 val = bborigenv.getVar(key, True) 85 val = bborigenv.getVar(key)
86 if val is not None: 86 if val is not None:
87 self.origenv[key] = str(val) 87 self.origenv[key] = str(val)
88 88