diff options
Diffstat (limited to 'meta/lib/oeqa/runtime/context.py')
-rw-r--r-- | meta/lib/oeqa/runtime/context.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/meta/lib/oeqa/runtime/context.py b/meta/lib/oeqa/runtime/context.py index cb7227a8df..daabc44910 100644 --- a/meta/lib/oeqa/runtime/context.py +++ b/meta/lib/oeqa/runtime/context.py | |||
@@ -8,6 +8,7 @@ import os | |||
8 | import sys | 8 | import sys |
9 | 9 | ||
10 | from oeqa.core.context import OETestContext, OETestContextExecutor | 10 | from oeqa.core.context import OETestContext, OETestContextExecutor |
11 | from oeqa.core.target.serial import OESerialTarget | ||
11 | from oeqa.core.target.ssh import OESSHTarget | 12 | from oeqa.core.target.ssh import OESSHTarget |
12 | from oeqa.core.target.qemu import OEQemuTarget | 13 | from oeqa.core.target.qemu import OEQemuTarget |
13 | 14 | ||
@@ -60,7 +61,7 @@ class OERuntimeTestContextExecutor(OETestContextExecutor): | |||
60 | runtime_group = self.parser.add_argument_group('runtime options') | 61 | runtime_group = self.parser.add_argument_group('runtime options') |
61 | 62 | ||
62 | runtime_group.add_argument('--target-type', action='store', | 63 | runtime_group.add_argument('--target-type', action='store', |
63 | default=self.default_target_type, choices=['simpleremote', 'qemu'], | 64 | default=self.default_target_type, choices=['simpleremote', 'qemu', 'serial'], |
64 | help="Target type of device under test, default: %s" \ | 65 | help="Target type of device under test, default: %s" \ |
65 | % self.default_target_type) | 66 | % self.default_target_type) |
66 | runtime_group.add_argument('--target-ip', action='store', | 67 | runtime_group.add_argument('--target-ip', action='store', |
@@ -108,6 +109,8 @@ class OERuntimeTestContextExecutor(OETestContextExecutor): | |||
108 | target = OESSHTarget(logger, target_ip, server_ip, **kwargs) | 109 | target = OESSHTarget(logger, target_ip, server_ip, **kwargs) |
109 | elif target_type == 'qemu': | 110 | elif target_type == 'qemu': |
110 | target = OEQemuTarget(logger, server_ip, **kwargs) | 111 | target = OEQemuTarget(logger, server_ip, **kwargs) |
112 | elif target_type == 'serial': | ||
113 | target = OESerialTarget(logger, target_ip, server_ip, **kwargs) | ||
111 | else: | 114 | else: |
112 | # XXX: This code uses the old naming convention for controllers and | 115 | # XXX: This code uses the old naming convention for controllers and |
113 | # targets, the idea it is to leave just targets as the controller | 116 | # targets, the idea it is to leave just targets as the controller |
@@ -203,8 +206,15 @@ class OERuntimeTestContextExecutor(OETestContextExecutor): | |||
203 | 206 | ||
204 | super(OERuntimeTestContextExecutor, self)._process_args(logger, args) | 207 | super(OERuntimeTestContextExecutor, self)._process_args(logger, args) |
205 | 208 | ||
209 | td = self.tc_kwargs['init']['td'] | ||
210 | |||
206 | target_kwargs = {} | 211 | target_kwargs = {} |
212 | target_kwargs['machine'] = td.get("MACHINE") or None | ||
207 | target_kwargs['qemuboot'] = args.qemu_boot | 213 | target_kwargs['qemuboot'] = args.qemu_boot |
214 | target_kwargs['serialcontrol_cmd'] = td.get("TEST_SERIALCONTROL_CMD") or None | ||
215 | target_kwargs['serialcontrol_extra_args'] = td.get("TEST_SERIALCONTROL_EXTRA_ARGS") or "" | ||
216 | target_kwargs['serialcontrol_ps1'] = td.get("TEST_SERIALCONTROL_PS1") or None | ||
217 | target_kwargs['serialcontrol_connect_timeout'] = td.get("TEST_SERIALCONTROL_CONNECT_TIMEOUT") or None | ||
208 | 218 | ||
209 | self.tc_kwargs['init']['target'] = \ | 219 | self.tc_kwargs['init']['target'] = \ |
210 | OERuntimeTestContextExecutor.getTarget(args.target_type, | 220 | OERuntimeTestContextExecutor.getTarget(args.target_type, |