pytest_esp_timer_ut.py 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. # SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
  2. # SPDX-License-Identifier: Unlicense OR CC0-1.0
  3. import pytest
  4. from pytest_embedded import Dut
  5. CONFIGS = [
  6. pytest.param('general', marks=[pytest.mark.supported_targets, pytest.mark.temp_skip_ci(targets=['esp32c6'], reason='c6 support TBD')]),
  7. pytest.param('release', marks=[pytest.mark.supported_targets, pytest.mark.temp_skip_ci(targets=['esp32c6'], reason='c6 support TBD')]),
  8. pytest.param('single_core', marks=[pytest.mark.esp32]),
  9. pytest.param('freertos_compliance', marks=[pytest.mark.esp32]),
  10. pytest.param('isr_dispatch_esp32', marks=[pytest.mark.esp32]),
  11. ]
  12. @pytest.mark.generic
  13. @pytest.mark.parametrize('config', CONFIGS, indirect=True)
  14. def test_esp_timer(dut: Dut) -> None:
  15. dut.expect_exact('Press ENTER to see the list of tests')
  16. dut.write('*')
  17. dut.expect_unity_test_output(timeout=240)
  18. @pytest.mark.esp32
  19. @pytest.mark.quad_psram
  20. @pytest.mark.parametrize('config', [
  21. 'psram',
  22. ], indirect=True)
  23. def test_esp_timer_psram(dut: Dut) -> None:
  24. dut.expect_exact('Press ENTER to see the list of tests')
  25. dut.write('*')
  26. dut.expect_unity_test_output(timeout=240)
  27. @pytest.mark.esp32c2
  28. @pytest.mark.generic
  29. @pytest.mark.xtal_26mhz
  30. @pytest.mark.parametrize(
  31. 'config, baud',
  32. [
  33. ('26mhz_esp32c2', '74880'),
  34. ],
  35. indirect=True,
  36. )
  37. def test_esp_timer_esp32c2_xtal_26mhz(dut: Dut) -> None:
  38. dut.expect_exact('Press ENTER to see the list of tests')
  39. dut.write('*')
  40. dut.expect_unity_test_output(timeout=240)