tests: gdbstub: Improve test case
Gdbstub test improvements: using pytest fixtures, parametrization, and expected pattern matching on outputs from GDB and the test application. Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
This commit is contained in:
parent
c9e651b12c
commit
cbbb1cabd6
7 changed files with 103 additions and 43 deletions
20
tests/subsys/debug/gdbstub/pytest/conftest.py
Normal file
20
tests/subsys/debug/gdbstub/pytest/conftest.py
Normal file
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# Copyright (c) 2023 intel Corporation.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
import pytest
|
||||
|
||||
def pytest_addoption(parser):
|
||||
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))
|
||||
#
|
Loading…
Add table
Add a link
Reference in a new issue