pytest_esp_flash.py 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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.supported_targets
  6. @pytest.mark.generic
  7. @pytest.mark.parametrize(
  8. 'config',
  9. [
  10. 'release',
  11. 'flash_qio',
  12. 'verify',
  13. 'special',
  14. ],
  15. indirect=True,
  16. )
  17. def test_esp_flash(dut: Dut) -> None:
  18. dut.run_all_single_board_cases(group='esp_flash')
  19. @pytest.mark.esp32s3
  20. @pytest.mark.esp32c3
  21. @pytest.mark.esp32c2
  22. @pytest.mark.esp32c6
  23. @pytest.mark.esp32h2
  24. @pytest.mark.generic
  25. @pytest.mark.parametrize(
  26. 'config',
  27. [
  28. 'rom_impl',
  29. ],
  30. indirect=True,
  31. )
  32. def test_esp_flash_rom(dut: Dut) -> None:
  33. dut.run_all_single_board_cases(group='esp_flash')
  34. @pytest.mark.esp32
  35. @pytest.mark.esp32s2
  36. @pytest.mark.esp32s3
  37. @pytest.mark.esp32c3
  38. @pytest.mark.esp32c2
  39. @pytest.mark.flash_multi
  40. @pytest.mark.parametrize(
  41. 'config',
  42. [
  43. 'release',
  44. ],
  45. indirect=True,
  46. )
  47. def test_esp_flash_multi(dut: Dut) -> None:
  48. dut.run_all_single_board_cases(group='esp_flash_multi', timeout=120)
  49. @pytest.mark.esp32c2
  50. @pytest.mark.generic
  51. @pytest.mark.xtal_26mhz
  52. @pytest.mark.parametrize(
  53. 'config, baud',
  54. [
  55. ('esp32c2_xtal26m', '74880'),
  56. ('esp32c2_xtal26m_rom', '74880'),
  57. ],
  58. indirect=True,
  59. )
  60. def test_esp_flash_26mhz_c2(dut: Dut) -> None:
  61. dut.run_all_single_board_cases(group='esp_flash')