ci: fix download with multi-dut test cases with markers only

This commit is contained in:
Fu Hanxi 2024-01-15 14:33:48 +01:00
parent c8dffc9378
commit 61aafd1e89
No known key found for this signature in database
GPG Key ID: 19399699CF3C4B16

View File

@ -79,6 +79,17 @@ def config(request: FixtureRequest) -> str:
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
def test_func_name(request: FixtureRequest) -> str:
return request.node.function.__name__ # type: ignore