blob: a21762c91034262b3df7e1c0a4097faf877286b5 [file] [log] [blame]
# Copyright (c) 2020 Intel Corporation.
#
# SPDX-License-Identifier: Apache-2.0
import pytest
# add option "--comdopt" to pytest, or it will report "unknown option"
# this option is passed from twister.
def pytest_addoption(parser):
parser.addoption(
'--cmdopt'
)
parser.addoption(
'--custom-pytest-arg'
)
# define fixture to return value of option "--cmdopt", this fixture
# will be requested by other fixture of tests.
@pytest.fixture()
def cmdopt(request):
return request.config.getoption('--cmdopt')
# define fixture to return value of option "--custom-pytest-arg", this fixture
# will be requested by other fixture of tests.
@pytest.fixture()
def custom_pytest_arg(request):
return request.config.getoption('--custom-pytest-arg')