pytest_esp_timer_ut.py 1.1 KB

123456789101112131415161718192021222324252627282930313233
  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]),
  7. pytest.param('release', marks=[pytest.mark.supported_targets]),
  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. pytest.param('26mhz_esp32c2', marks=[pytest.mark.esp32c2]),
  12. ]
  13. @pytest.mark.generic
  14. @pytest.mark.parametrize('config', CONFIGS, indirect=True)
  15. def test_esp_timer(dut: Dut) -> None:
  16. dut.expect_exact('Press ENTER to see the list of tests')
  17. dut.write('*')
  18. dut.expect_unity_test_output(timeout=240)
  19. @pytest.mark.esp32
  20. @pytest.mark.quad_psram
  21. @pytest.mark.parametrize('config', [
  22. 'psram',
  23. ], indirect=True)
  24. def test_esp_timer_psram(dut: Dut) -> None:
  25. dut.expect_exact('Press ENTER to see the list of tests')
  26. dut.write('*')
  27. dut.expect_unity_test_output(timeout=240)