diff options
Diffstat (limited to 'meta/lib/oeqa/runtime/context.py')
-rw-r--r-- | meta/lib/oeqa/runtime/context.py | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/meta/lib/oeqa/runtime/context.py b/meta/lib/oeqa/runtime/context.py index 943e29b0d9..3826f27642 100644 --- a/meta/lib/oeqa/runtime/context.py +++ b/meta/lib/oeqa/runtime/context.py @@ -1,5 +1,8 @@ +# # Copyright (C) 2016 Intel Corporation -# Released under the MIT license (see COPYING.MIT) +# +# SPDX-License-Identifier: MIT +# import os @@ -44,12 +47,12 @@ class OERuntimeTestContextExecutor(OETestContextExecutor): default_data = None default_test_data = 'data/testdata.json' default_tests = '' + default_json_result_dir = '%s-results' % name default_target_type = 'simpleremote' default_manifest = 'data/manifest' default_server_ip = '192.168.7.1' default_target_ip = '192.168.7.2' - default_host_dumper_dir = '/tmp/oe-saved-tests' default_extract_dir = 'packages/extracted' def register_commands(self, logger, subparsers): @@ -71,13 +74,11 @@ class OERuntimeTestContextExecutor(OETestContextExecutor): % self.default_server_ip) runtime_group.add_argument('--host-dumper-dir', action='store', - default=self.default_host_dumper_dir, - help="Directory where host status is dumped, if tests fails, default: %s" \ - % self.default_host_dumper_dir) + help="Directory where host status is dumped, if tests fails") runtime_group.add_argument('--packages-manifest', action='store', default=self.default_manifest, - help="Package manifest of the image under testi, default: %s" \ + help="Package manifest of the image under test, default: %s" \ % self.default_manifest) runtime_group.add_argument('--extract-dir', action='store', @@ -98,6 +99,12 @@ class OERuntimeTestContextExecutor(OETestContextExecutor): target_ip = target_ip_port[0] kwargs['port'] = target_ip_port[1] + if server_ip: + server_ip_port = server_ip.split(':') + if len(server_ip_port) == 2: + server_ip = server_ip_port[0] + kwargs['server_port'] = int(server_ip_port[1]) + if target_type == 'simpleremote': target = OESSHTarget(logger, target_ip, server_ip, **kwargs) elif target_type == 'qemu': @@ -138,7 +145,7 @@ class OERuntimeTestContextExecutor(OETestContextExecutor): def add_controller_list(path): if not os.path.exists(os.path.join(path, '__init__.py')): raise OSError('Controllers directory %s exists but is missing __init__.py' % path) - files = sorted([f for f in os.listdir(path) if f.endswith('.py') and not f.startswith('_')]) + files = sorted([f for f in os.listdir(path) if f.endswith('.py') and not f.startswith('_') and not f.startswith('.#')]) for f in files: module = 'oeqa.controllers.' + f[:-3] if module not in controllerslist: @@ -178,7 +185,7 @@ class OERuntimeTestContextExecutor(OETestContextExecutor): except: obj = None return obj - + @staticmethod def readPackagesManifest(manifest): if not manifest or not os.path.exists(manifest): |