1# Copyright (c) 2024 Antmicro <www.antmicro.com>
2#
3# SPDX-License-Identifier: Apache-2.0
4
5from west.commands import WestCommand
6from run_common import add_parser_common, do_run_common
7
8EXPORT_DESCRIPTION = '''\
9Run RobotFramework test suites with a runner of choice.
10'''
11
12
13class Robot(WestCommand):
14
15    def __init__(self):
16        super(Robot, self).__init__(
17            'robot',
18            # Keep this in sync with the string in west-commands.yml.
19            'run RobotFramework test suites',
20            EXPORT_DESCRIPTION,
21            accepts_unknown_args=True)
22
23        self.runner_key = 'robot-runner'  # in runners.yaml
24
25    def do_add_parser(self, parser_adder):
26        return add_parser_common(self, parser_adder)
27
28    def do_run(self, my_args, runner_args):
29        do_run_common(self, my_args, runner_args)
30