forked from espressif/esp-idf
ci: fix download with multi-dut test cases with markers only
This commit is contained in:
11
conftest.py
11
conftest.py
@@ -79,6 +79,17 @@ def config(request: FixtureRequest) -> str:
|
|||||||
return getattr(request, 'param', None) or DEFAULT_SDKCONFIG # type: ignore
|
return getattr(request, 'param', None) or DEFAULT_SDKCONFIG # type: ignore
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.fixture
|
||||||
|
@multi_dut_fixture
|
||||||
|
def target(request: FixtureRequest, dut_total: int, dut_index: int) -> str:
|
||||||
|
plugin = request.config.stash[IDF_PYTEST_EMBEDDED_KEY]
|
||||||
|
|
||||||
|
if dut_total == 1:
|
||||||
|
return plugin.target[0] # type: ignore
|
||||||
|
|
||||||
|
return plugin.target[dut_index] # type: ignore
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def test_func_name(request: FixtureRequest) -> str:
|
def test_func_name(request: FixtureRequest) -> str:
|
||||||
return request.node.function.__name__ # type: ignore
|
return request.node.function.__name__ # type: ignore
|
||||||
|
Reference in New Issue
Block a user