2022-11-02 03:39:29 +00:00
|
|
|
# SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD
|
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
|
|
|
import pytest
|
|
|
|
|
|
|
|
|
|
|
|
# If `test_env` is define, should not run on generic runner
|
|
|
|
@pytest.mark.supported_targets
|
2023-01-30 04:08:04 +00:00
|
|
|
@pytest.mark.esp32h2
|
2022-11-02 03:39:29 +00:00
|
|
|
@pytest.mark.generic
|
2022-11-22 06:39:26 +00:00
|
|
|
@pytest.mark.parametrize('config', ['defaults', 'release', 'freertos_compliance', 'freertos_flash',], indirect=True)
|
2022-11-02 03:39:29 +00:00
|
|
|
def test_master_single_dev(case_tester) -> None: # type: ignore
|
|
|
|
for case in case_tester.test_menu:
|
|
|
|
if 'test_env' in case.attributes:
|
|
|
|
continue
|
|
|
|
case_tester.run_normal_case(case=case, reset=True)
|
|
|
|
|
|
|
|
|
|
|
|
# Job for test_env `external_flash` just for esp32 only
|
|
|
|
@pytest.mark.esp32
|
2023-01-31 07:49:43 +00:00
|
|
|
@pytest.mark.flash_multi
|
2022-11-22 06:39:26 +00:00
|
|
|
@pytest.mark.parametrize('config', ['defaults',], indirect=True)
|
2022-11-02 03:39:29 +00:00
|
|
|
def test_master_esp_flash(case_tester) -> None: # type: ignore
|
|
|
|
for case in case_tester.test_menu:
|
|
|
|
# test case `spi_bus_lock_with_flash` use difference test env
|
|
|
|
if case.attributes.get('test_env') == 'external_flash':
|
|
|
|
case_tester.run_normal_case(case=case, reset=True)
|
|
|
|
|
|
|
|
|
|
|
|
# if `test_env` not defined, will run on `generic_multi_device` by default
|
|
|
|
@pytest.mark.supported_targets
|
2023-01-30 04:08:04 +00:00
|
|
|
@pytest.mark.esp32h2
|
2022-11-02 03:39:29 +00:00
|
|
|
@pytest.mark.generic_multi_device
|
2023-02-23 11:43:10 +00:00
|
|
|
@pytest.mark.parametrize(
|
|
|
|
'count, config',
|
|
|
|
[
|
|
|
|
(2, 'defaults',),
|
|
|
|
(2, 'release',),
|
|
|
|
(2, 'freertos_compliance',),
|
|
|
|
(2, 'freertos_flash',),
|
|
|
|
(2, 'iram_safe'),
|
|
|
|
],
|
|
|
|
indirect=True
|
|
|
|
)
|
2022-11-02 03:39:29 +00:00
|
|
|
def test_master_multi_dev(case_tester) -> None: # type: ignore
|
|
|
|
for case in case_tester.test_menu:
|
|
|
|
if case.attributes.get('test_env', 'generic_multi_device') == 'generic_multi_device':
|
|
|
|
case_tester.run_multi_dev_case(case=case, reset=True)
|