pytest_gptimer.py 808 B

123456789101112131415161718192021222324252627282930313233343536
  1. # SPDX-FileCopyrightText: 2021-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. @pytest.mark.parametrize(
  8. 'config',
  9. [
  10. 'iram_safe',
  11. 'release',
  12. ],
  13. indirect=True,
  14. )
  15. def test_gptimer(dut: Dut) -> None:
  16. dut.expect_exact('Press ENTER to see the list of tests')
  17. dut.write('*')
  18. dut.expect_unity_test_output()
  19. @pytest.mark.esp32c2
  20. @pytest.mark.xtal_26mhz
  21. @pytest.mark.parametrize(
  22. 'config, baud',
  23. [
  24. ('esp32c2_xtal26m', '74880'),
  25. ],
  26. indirect=True,
  27. )
  28. def test_gptimer_esp32c2_xtal_26mhz(dut: Dut) -> None:
  29. dut.expect_exact('Press ENTER to see the list of tests')
  30. dut.write('*')
  31. dut.expect_unity_test_output()