mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-09 04:25:32 +00:00
CI: migrated system example tests to pytest-embedded framework
This commit is contained in:
18
examples/system/pthread/pytest_pthread.py
Normal file
18
examples/system/pthread/pytest_pthread.py
Normal file
@@ -0,0 +1,18 @@
|
||||
# SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
import pytest
|
||||
from pytest_embedded import Dut
|
||||
|
||||
|
||||
@pytest.mark.supported_targets
|
||||
@pytest.mark.generic
|
||||
def test_pthread(dut: Dut) -> None:
|
||||
|
||||
# Note: this test doesn't really confirm anything, except that threads are created
|
||||
# and stdout is not being corrupted by multiple threads printing ot it.
|
||||
dut.expect(r'Created thread 0x[\da-f]+')
|
||||
dut.expect(r'Created larger stack thread 0x[\da-f]+')
|
||||
dut.expect(r'Threads have exited')
|
||||
dut.expect(r'Created thread 0x[\da-f]+ with new default config')
|
||||
dut.expect('Thread has exited')
|
Reference in New Issue
Block a user