pytest_ulp_riscv.py 856 B

12345678910111213141516171819202122232425
  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.esp32s2
  6. @pytest.mark.esp32s3
  7. @pytest.mark.generic
  8. def test_ulp_riscv(dut: Dut) -> None:
  9. dut.expect('Press ENTER to see the list of tests')
  10. dut.write('![ulp_deep_sleep_wakeup]')
  11. dut.expect_unity_test_output()
  12. # Run all deepsleep wakeup tests one after the other instead of running them all with the `ulp_deep_sleep_wakeup` tag.
  13. # This makes sure that all tests are run even after one test causes a system reset.
  14. @pytest.mark.esp32s2
  15. @pytest.mark.esp32s3
  16. @pytest.mark.generic
  17. def test_ulp_deep_sleep_wakeup(dut: Dut) -> None:
  18. dut.expect('Press ENTER to see the list of tests')
  19. dut.write('"ULP-RISC-V is able to wakeup main CPU from deep sleep"')
  20. dut.expect('rst:0x5')