pytest_pthread.py 650 B

123456789101112131415161718
  1. # SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
  2. # SPDX-License-Identifier: CC0-1.0
  3. import pytest
  4. from pytest_embedded import Dut
  5. @pytest.mark.supported_targets
  6. @pytest.mark.generic
  7. def test_pthread(dut: Dut) -> None:
  8. # Note: this test doesn't really confirm anything, except that threads are created
  9. # and stdout is not being corrupted by multiple threads printing ot it.
  10. dut.expect(r'Created thread 0x[\da-f]+')
  11. dut.expect(r'Created larger stack thread 0x[\da-f]+')
  12. dut.expect(r'Threads have exited')
  13. dut.expect(r'Created thread 0x[\da-f]+ with new default config')
  14. dut.expect('Thread has exited')