Add `gdb_target_remote` test parameter for GDB `target remote` command instead of its hardcoded value to allow different types of gdbstub serial interfaces as well as different TCP ports in gdbstub test suites possibly run in parallel on the same host. Move all GDB log configuration parameters from GDB script to the fixture code. Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
26 lines
589 B
Python
26 lines
589 B
Python
#
|
|
# Copyright (c) 2023 intel Corporation.
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
#
|
|
|
|
import pytest
|
|
|
|
def pytest_addoption(parser):
|
|
parser.addoption('--gdb_target_remote')
|
|
parser.addoption('--gdb_timeout')
|
|
parser.addoption('--gdb_script')
|
|
|
|
@pytest.fixture()
|
|
def gdb_script(request):
|
|
return request.config.getoption('--gdb_script')
|
|
|
|
@pytest.fixture()
|
|
def gdb_timeout(request):
|
|
return int(request.config.getoption('--gdb_timeout', default=60))
|
|
|
|
@pytest.fixture()
|
|
def gdb_target_remote(request):
|
|
return request.config.getoption('--gdb_target_remote', default=":5678")
|
|
#
|