mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-10 20:54:24 +00:00
ci: fix collect multi-dut test case with markers issue
While collecting, we stop registering the new plugin. Otherwise the new created plugin will override the one we passed also run the tests inside idf. the behavior is different.
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
# SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
from idf_pytest.constants import CollectMode
|
||||
@@ -45,11 +44,14 @@ def test_get_pytest_cases_single_specific(tmp_path: Path) -> None:
|
||||
def test_get_pytest_cases_multi_specific(tmp_path: Path) -> None:
|
||||
script = tmp_path / 'pytest_get_pytest_cases_multi_specific.py'
|
||||
script.write_text(TEMPLATE_SCRIPT)
|
||||
cases = get_pytest_cases([str(tmp_path)], 'esp32s3,esp32s2, esp32s2')
|
||||
cases = get_pytest_cases([str(tmp_path)], 'esp32s2,esp32s2, esp32s3')
|
||||
|
||||
assert len(cases) == 1
|
||||
assert cases[0].targets == ['esp32s2', 'esp32s2', 'esp32s3']
|
||||
|
||||
cases = get_pytest_cases([str(tmp_path)], 'esp32s3,esp32s2,esp32s2') # order matters
|
||||
assert len(cases) == 0
|
||||
|
||||
|
||||
def test_get_pytest_cases_multi_all(tmp_path: Path) -> None:
|
||||
script = tmp_path / 'pytest_get_pytest_cases_multi_all.py'
|
||||
|
Reference in New Issue
Block a user