pytest_esp_flash.py 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. # SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
  2. # SPDX-License-Identifier: Apache-2.0
  3. import pytest
  4. from pytest_embedded import Dut
  5. @pytest.mark.esp32
  6. @pytest.mark.esp32s2
  7. @pytest.mark.esp32s3
  8. @pytest.mark.esp32c3
  9. @pytest.mark.esp32c2
  10. @pytest.mark.generic
  11. @pytest.mark.parametrize(
  12. 'config',
  13. [
  14. 'release',
  15. 'flash_qio',
  16. 'verify'
  17. ],
  18. indirect=True,
  19. )
  20. def test_esp_flash(dut: Dut) -> None:
  21. dut.expect_exact('Press ENTER to see the list of tests')
  22. dut.write('[esp_flash]')
  23. dut.expect_unity_test_output()
  24. @pytest.mark.esp32s3
  25. @pytest.mark.esp32c3
  26. @pytest.mark.esp32c2
  27. @pytest.mark.generic
  28. @pytest.mark.parametrize(
  29. 'config',
  30. [
  31. 'rom_impl',
  32. ],
  33. indirect=True,
  34. )
  35. def test_esp_flash_rom(dut: Dut) -> None:
  36. dut.expect_exact('Press ENTER to see the list of tests')
  37. dut.write('[esp_flash]')
  38. dut.expect_unity_test_output()
  39. @pytest.mark.esp32
  40. @pytest.mark.esp32s2
  41. @pytest.mark.esp32s3
  42. @pytest.mark.esp32c3
  43. @pytest.mark.esp32c2
  44. @pytest.mark.flash_multi
  45. @pytest.mark.parametrize(
  46. 'config',
  47. [
  48. 'release',
  49. ],
  50. indirect=True,
  51. )
  52. def test_esp_flash_multi(dut: Dut) -> None:
  53. dut.run_all_single_board_cases(group='esp_flash_multi', timeout=120)