1# Copyright (c) 2018 Foundries.io
2#
3# SPDX-License-Identifier: Apache-2.0
4
5'''Common fixtures for use testing the runner package.'''
6
7import pytest
8
9from runners.core import RunnerConfig, FileType
10
11RC_BUILD_DIR = '/test/build-dir'
12RC_BOARD_DIR = '/test/zephyr/boards/test-arch/test-board'
13RC_KERNEL_ELF = 'test-zephyr.elf'
14RC_KERNEL_HEX = 'test-zephyr.hex'
15RC_KERNEL_BIN = 'test-zephyr.bin'
16RC_GDB = 'test-none-gdb'
17RC_OPENOCD = 'test-openocd'
18RC_OPENOCD_SEARCH = ['/test/openocd/search']
19
20
21@pytest.fixture
22def runner_config():
23    '''Fixture which provides a runners.core.RunnerConfig.'''
24    return RunnerConfig(RC_BUILD_DIR, RC_BOARD_DIR, RC_KERNEL_ELF,
25                        RC_KERNEL_HEX, RC_KERNEL_BIN, None, FileType.OTHER,
26                        gdb=RC_GDB, openocd=RC_OPENOCD,
27                        openocd_search=RC_OPENOCD_SEARCH)
28