diff options
Diffstat (limited to 'meta')
-rw-r--r-- | meta/lib/oeqa/targetcontrol.py | 18 | ||||
-rw-r--r-- | meta/lib/oeqa/utils/commands.py | 4 |
2 files changed, 12 insertions, 10 deletions
diff --git a/meta/lib/oeqa/targetcontrol.py b/meta/lib/oeqa/targetcontrol.py index edc0d01c1e..f461651930 100644 --- a/meta/lib/oeqa/targetcontrol.py +++ b/meta/lib/oeqa/targetcontrol.py | |||
@@ -68,7 +68,7 @@ class BaseTarget(object): | |||
68 | bb.note("SSH log file: %s" % self.sshlog) | 68 | bb.note("SSH log file: %s" % self.sshlog) |
69 | 69 | ||
70 | @abstractmethod | 70 | @abstractmethod |
71 | def start(self, params=None): | 71 | def start(self, params=None, ssh=True): |
72 | pass | 72 | pass |
73 | 73 | ||
74 | @abstractmethod | 74 | @abstractmethod |
@@ -176,11 +176,12 @@ class QemuTarget(BaseTarget): | |||
176 | bb.note("Qemu log file: %s" % self.qemulog) | 176 | bb.note("Qemu log file: %s" % self.qemulog) |
177 | super(QemuTarget, self).deploy() | 177 | super(QemuTarget, self).deploy() |
178 | 178 | ||
179 | def start(self, params=None): | 179 | def start(self, params=None, ssh=True): |
180 | if self.runner.start(params): | 180 | if self.runner.start(params, get_ip=ssh): |
181 | self.ip = self.runner.ip | 181 | if ssh: |
182 | self.server_ip = self.runner.server_ip | 182 | self.ip = self.runner.ip |
183 | self.connection = SSHControl(ip=self.ip, logfile=self.sshlog) | 183 | self.server_ip = self.runner.server_ip |
184 | self.connection = SSHControl(ip=self.ip, logfile=self.sshlog) | ||
184 | else: | 185 | else: |
185 | self.stop() | 186 | self.stop() |
186 | if os.path.exists(self.qemulog): | 187 | if os.path.exists(self.qemulog): |
@@ -231,8 +232,9 @@ class SimpleRemoteTarget(BaseTarget): | |||
231 | def deploy(self): | 232 | def deploy(self): |
232 | super(SimpleRemoteTarget, self).deploy() | 233 | super(SimpleRemoteTarget, self).deploy() |
233 | 234 | ||
234 | def start(self, params=None): | 235 | def start(self, params=None, ssh=True): |
235 | self.connection = SSHControl(self.ip, logfile=self.sshlog, port=self.port) | 236 | if ssh: |
237 | self.connection = SSHControl(self.ip, logfile=self.sshlog, port=self.port) | ||
236 | 238 | ||
237 | def stop(self): | 239 | def stop(self): |
238 | self.connection = None | 240 | self.connection = None |
diff --git a/meta/lib/oeqa/utils/commands.py b/meta/lib/oeqa/utils/commands.py index 93a0e4846b..32e001c6b5 100644 --- a/meta/lib/oeqa/utils/commands.py +++ b/meta/lib/oeqa/utils/commands.py | |||
@@ -178,7 +178,7 @@ def create_temp_layer(templayerdir, templayername, priority=999, recipepathspec= | |||
178 | 178 | ||
179 | 179 | ||
180 | @contextlib.contextmanager | 180 | @contextlib.contextmanager |
181 | def runqemu(pn): | 181 | def runqemu(pn, ssh=True): |
182 | 182 | ||
183 | import bb.tinfoil | 183 | import bb.tinfoil |
184 | import bb.build | 184 | import bb.build |
@@ -222,7 +222,7 @@ def runqemu(pn): | |||
222 | try: | 222 | try: |
223 | qemu.deploy() | 223 | qemu.deploy() |
224 | try: | 224 | try: |
225 | qemu.start() | 225 | qemu.start(ssh=ssh) |
226 | except bb.build.FuncFailed: | 226 | except bb.build.FuncFailed: |
227 | raise Exception('Failed to start QEMU - see the logs in %s' % logdir) | 227 | raise Exception('Failed to start QEMU - see the logs in %s' % logdir) |
228 | 228 | ||