mirror of
https://github.com/zephyrproject-rtos/zephyr
synced 2025-08-03 07:34:17 +00:00
Require all implementations to provide a do_create(), a new ZephyrBinaryRunner abstract class method, and make create() itself concrete. This allows us to enforce common conventions related to individual runner capabilities as each runner provides to the core via RunnerCaps. For now, just enforce that: - common options related to capabilities are always added, so runners can't reuse them for different ends - common options provided for runners which don't support them emit sensible error messages that should be easy to diagnose and support Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
32 lines
684 B
Python
32 lines
684 B
Python
# Copyright (c) 2017 Linaro Limited.
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
'''Runner stub for QEMU.'''
|
|
|
|
from runners.core import ZephyrBinaryRunner, RunnerCaps
|
|
|
|
|
|
class QemuBinaryRunner(ZephyrBinaryRunner):
|
|
'''Place-holder for QEMU runner customizations.'''
|
|
|
|
@classmethod
|
|
def name(cls):
|
|
return 'qemu'
|
|
|
|
@classmethod
|
|
def capabilities(cls):
|
|
# This is a stub.
|
|
return RunnerCaps(commands=set())
|
|
|
|
@classmethod
|
|
def do_add_parser(cls, parser):
|
|
pass # Nothing to do.
|
|
|
|
@classmethod
|
|
def do_create(cls, cfg, args):
|
|
return QemuBinaryRunner(cfg)
|
|
|
|
def do_run(self, command, **kwargs):
|
|
pass
|