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:
Fu Hanxi
2024-01-12 14:42:00 +01:00
parent 1ad354bff3
commit c8dffc9378
7 changed files with 65 additions and 23 deletions

View File

@@ -1,10 +1,12 @@
# SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
# SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: Apache-2.0
import os
import sys
import tempfile
from pathlib import Path
import pytest
tools_ci_dir = os.path.join(os.path.dirname(__file__), '..', '..')
if tools_ci_dir not in sys.path:
sys.path.append(tools_ci_dir)
@@ -13,6 +15,8 @@ tools_dir = os.path.join(os.path.dirname(__file__), '..', '..', '..')
if tools_dir not in sys.path:
sys.path.append(tools_dir)
from idf_ci_utils import IDF_PATH # noqa: E402
def create_project(name: str, folder: Path) -> Path:
p = folder / name
@@ -46,3 +50,10 @@ void app_main(void) {}
)
return p
@pytest.fixture
def tmp_path() -> Path:
os.makedirs(os.path.join(IDF_PATH, 'pytest_embedded_log'), exist_ok=True)
return Path(tempfile.mkdtemp(prefix=os.path.join(IDF_PATH, 'pytest_embedded_log') + os.sep))