diff options
Diffstat (limited to 'meta/lib/oeqa/controllers/masterimage.py')
-rw-r--r-- | meta/lib/oeqa/controllers/masterimage.py | 16 |
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 | ||