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_EXE = 'test-zephyr.exe' 15RC_KERNEL_HEX = 'test-zephyr.hex' 16RC_KERNEL_BIN = 'test-zephyr.bin' 17RC_GDB = 'test-none-gdb' 18RC_OPENOCD = 'test-openocd' 19RC_OPENOCD_SEARCH = ['/test/openocd/search'] 20 21 22@pytest.fixture 23def runner_config(): 24 '''Fixture which provides a runners.core.RunnerConfig.''' 25 return RunnerConfig(RC_BUILD_DIR, RC_BOARD_DIR, RC_KERNEL_ELF, RC_KERNEL_EXE, 26 RC_KERNEL_HEX, RC_KERNEL_BIN, None, FileType.OTHER, 27 gdb=RC_GDB, openocd=RC_OPENOCD, 28 openocd_search=RC_OPENOCD_SEARCH) 29