test: add a script for supporting multi-dev and multi-stage case

This commit is contained in:
laokaiyao
2022-09-22 21:46:56 +08:00
parent 56a8b1716a
commit cf528deeb1
3 changed files with 391 additions and 0 deletions

View File

@@ -33,6 +33,12 @@ from pytest_embedded.plugin import multi_dut_argument, multi_dut_fixture
from pytest_embedded.utils import find_by_suffix
from pytest_embedded_idf.dut import IdfDut
try:
from tools.ci.idf_unity_tester import CaseTester
except ImportError:
sys.path.append(os.path.join(os.path.dirname(__file__), 'tools', 'ci'))
from idf_unity_tester import CaseTester
try:
import common_test_methods # noqa: F401
except ImportError:
@@ -118,6 +124,11 @@ def log_minimum_free_heap_size(dut: IdfDut, config: str) -> Callable[..., None]:
return real_func
@pytest.fixture
def case_tester(dut: IdfDut, **kwargs): # type: ignore
yield CaseTester(dut, **kwargs)
@pytest.fixture
@multi_dut_argument
def config(request: FixtureRequest) -> str: