summaryrefslogtreecommitdiffstats
path: root/meta/lib
diff options
context:
space:
mode:
authorAníbal Limón <anibal.limon@linux.intel.com>2016-12-02 14:47:33 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-01-23 12:05:20 +0000
commit6c3ca00884a34fb732a4c4cf6a64ac64458645af (patch)
tree7d570bf23f83b9be2d9c5db9d8d59a425108f68b /meta/lib
parent32a3f4d6abb79ba93b215d7b9fafbc84900bdae1 (diff)
downloadpoky-6c3ca00884a34fb732a4c4cf6a64ac64458645af.tar.gz
oeqa/runtime/context: Add runtime option group and options for target type and server ip.
(From OE-Core rev: d3cc6761a13fd1da673829797b45323aed7997d0) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r--meta/lib/oeqa/runtime/context.py22
1 files changed, 20 insertions, 2 deletions
diff --git a/meta/lib/oeqa/runtime/context.py b/meta/lib/oeqa/runtime/context.py
index 10a8872871..e692bc0c60 100644
--- a/meta/lib/oeqa/runtime/context.py
+++ b/meta/lib/oeqa/runtime/context.py
@@ -44,17 +44,34 @@ class OERuntimeTestContextExecutor(OETestContextExecutor):
44 name = 'runtime' 44 name = 'runtime'
45 help = 'runtime test component' 45 help = 'runtime test component'
46 description = 'executes runtime tests over targets' 46 description = 'executes runtime tests over targets'
47
47 default_cases = os.path.join(os.path.abspath(os.path.dirname(__file__)), 48 default_cases = os.path.join(os.path.abspath(os.path.dirname(__file__)),
48 'cases') 49 'cases')
50 default_data = None
51
52 default_target_type = 'simpleremote'
53 default_server_ip = '192.168.7.1'
49 default_target_ip = '192.168.7.2' 54 default_target_ip = '192.168.7.2'
50 55
51 def register_commands(self, logger, subparsers): 56 def register_commands(self, logger, subparsers):
52 super(OERuntimeTestContextExecutor, self).register_commands(logger, subparsers) 57 super(OERuntimeTestContextExecutor, self).register_commands(logger, subparsers)
53 self.parser.add_argument('--target-ip', action='store', 58
59 runtime_group = self.parser.add_argument_group('runtime options')
60
61 runtime_group.add_argument('--target-type', action='store',
62 default=self.default_target_type, choices=['simpleremote', 'qemu'],
63 help="Target type of device under test, default: %s" \
64 % self.default_target_type)
65 runtime_group.add_argument('--target-ip', action='store',
54 default=self.default_target_ip, 66 default=self.default_target_ip,
55 help="IP address of device under test, default: %s" \ 67 help="IP address of device under test, default: %s" \
56 % self.default_target_ip) 68 % self.default_target_ip)
57 self.parser.add_argument('--packages-manifest', action='store', 69 runtime_group.add_argument('--server-ip', action='store',
70 default=self.default_target_ip,
71 help="IP address of device under test, default: %s" \
72 % self.default_server_ip)
73
74 runtime_group.add_argument('--packages-manifest', action='store',
58 help="Package manifest of the image under test") 75 help="Package manifest of the image under test")
59 76
60 def _process_args(self, logger, args): 77 def _process_args(self, logger, args):
@@ -63,6 +80,7 @@ class OERuntimeTestContextExecutor(OETestContextExecutor):
63 80
64 super(OERuntimeTestContextExecutor, self)._process_args(logger, args) 81 super(OERuntimeTestContextExecutor, self)._process_args(logger, args)
65 target = OESSHTarget(args.target_ip) 82 target = OESSHTarget(args.target_ip)
83
66 self.tc_kwargs['init']['target'] = target 84 self.tc_kwargs['init']['target'] = target
67 85
68 packages_manifest = os.path.join(os.getcwd(), args.packages_manifest) 86 packages_manifest = os.path.join(os.getcwd(), args.packages_manifest)