Files
esp-idf/examples/cxx/pthread/pytest_examples_cxx_pthread.py

22 lines
957 B
Python
Raw Normal View History

2025-02-24 10:18:03 +08:00
# SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: Unlicense OR CC0-1.0
import pytest
from pytest_embedded_idf.dut import IdfDut
2025-02-24 10:18:03 +08:00
from pytest_embedded_idf.utils import idf_parametrize
@pytest.mark.generic
2025-02-24 10:18:03 +08:00
@idf_parametrize('target', ['supported_targets'], indirect=['target'])
def test_examples_cpp_pthread(dut: IdfDut) -> None:
dut.expect(
[
r'pthread: This thread \(with the default name\) may run on any core.'
r'Core id: [01], prio: 5, minimum free stack: \d+ bytes\.',
r'Thread [12]: Core id: [01], prio: 5, minimum free stack: \d+ bytes\.',
r'Thread [12]: This is the INHERITING thread with the same parameters as our parent, '
r'including name. Core id: [01], prio: 5, minimum free stack: \d+ bytes\.',
r'Thread [12]: Core id: [01], prio: 5, minimum free stack: \d+ bytes\.',
],
expect_all=True,
)