Merge branch 'test/test_adc_on_dedicated_runners' into 'master'

ci: use adc dedicated test runners

See merge request espressif/esp-idf!19164
This commit is contained in:
Fu Hanxi 2022-09-16 15:58:36 +08:00
commit a42849f63c
8 changed files with 350 additions and 14 deletions

View File

@ -131,6 +131,7 @@ build:integration_test:
- sdio # UT_044, UT_045
- usb # USB Device & Host tests
- spi_multi # UT_C2_SPI_DUAL
- adc # component_ut_pytest_esp32x_adc
patterns:
- "{0}-{1}-{2}"
- "{0}-{2}"

View File

@ -233,8 +233,16 @@
.patterns-unit_test-spi_multi: &patterns-unit_test-spi_multi
- "components/esp_serial_slave_link/**/*"
- "components/driver/**/*"
- "components/hal/**/*"
- "examples/peripherals/spi_slave*/**/*"
# for jobs: component_ut_pytest_esp32x_adc:
.patterns-component_ut-adc: &patterns-component_ut-adc
- "components/esp_adc/**/*"
- "components/driver/**/*"
- "components/hal/**/*"
- "components/esp_hw_support/**/*"
- "components/efuse/**/*"
##############
# if anchors #
@ -513,6 +521,8 @@
changes: *patterns-build_system
- <<: *if-dev-push
changes: *patterns-component_ut
- <<: *if-dev-push
changes: *patterns-component_ut-adc
.rules:build:component_ut-esp32:
rules:
@ -532,6 +542,8 @@
changes: *patterns-build_system
- <<: *if-dev-push
changes: *patterns-component_ut
- <<: *if-dev-push
changes: *patterns-component_ut-adc
.rules:build:component_ut-esp32c2:
rules:
@ -547,6 +559,8 @@
changes: *patterns-build_components
- <<: *if-dev-push
changes: *patterns-build_system
- <<: *if-dev-push
changes: *patterns-component_ut-adc
.rules:build:component_ut-esp32c3:
rules:
@ -565,6 +579,8 @@
changes: *patterns-build_system
- <<: *if-dev-push
changes: *patterns-component_ut
- <<: *if-dev-push
changes: *patterns-component_ut-adc
.rules:build:component_ut-esp32h2:
rules:
@ -583,6 +599,8 @@
changes: *patterns-build_system
- <<: *if-dev-push
changes: *patterns-component_ut
- <<: *if-dev-push
changes: *patterns-component_ut-adc
.rules:build:component_ut-esp32s2:
rules:
@ -601,6 +619,8 @@
changes: *patterns-build_system
- <<: *if-dev-push
changes: *patterns-component_ut
- <<: *if-dev-push
changes: *patterns-component_ut-adc
.rules:build:component_ut-esp32s3:
rules:
@ -619,6 +639,8 @@
changes: *patterns-build_system
- <<: *if-dev-push
changes: *patterns-component_ut
- <<: *if-dev-push
changes: *patterns-component_ut-adc
.rules:build:custom_test:
rules:
@ -1011,6 +1033,8 @@
changes: *patterns-build_system
- <<: *if-dev-push
changes: *patterns-component_ut
- <<: *if-dev-push
changes: *patterns-component_ut-adc
- <<: *if-dev-push
changes: *patterns-custom_test
- <<: *if-dev-push
@ -1236,6 +1260,19 @@
- <<: *if-dev-push
changes: *patterns-component_ut
.rules:test:component_ut-esp32-adc:
rules:
- <<: *if-revert-branch
when: never
- <<: *if-protected
- <<: *if-label-build-only
when: never
- <<: *if-label-component_ut
- <<: *if-label-component_ut_esp32
- <<: *if-label-target_test
- <<: *if-dev-push
changes: *patterns-component_ut-adc
.rules:test:component_ut-esp32-bt:
rules:
- <<: *if-revert-branch
@ -1312,6 +1349,19 @@
- <<: *if-label-component_ut_esp32c2
- <<: *if-label-unit_test_esp32c2
.rules:test:component_ut-esp32c2-adc:
rules:
- <<: *if-revert-branch
when: never
- <<: *if-protected
- <<: *if-label-build-only
when: never
- <<: *if-label-component_ut
- <<: *if-label-component_ut_esp32c2
- <<: *if-label-target_test
- <<: *if-dev-push
changes: *patterns-component_ut-adc
.rules:test:component_ut-esp32c2-bt:
rules:
- <<: *if-revert-branch
@ -1393,6 +1443,19 @@
- <<: *if-dev-push
changes: *patterns-component_ut
.rules:test:component_ut-esp32c3-adc:
rules:
- <<: *if-revert-branch
when: never
- <<: *if-protected
- <<: *if-label-build-only
when: never
- <<: *if-label-component_ut
- <<: *if-label-component_ut_esp32c3
- <<: *if-label-target_test
- <<: *if-dev-push
changes: *patterns-component_ut-adc
.rules:test:component_ut-esp32c3-bt:
rules:
- <<: *if-revert-branch
@ -1474,6 +1537,19 @@
- <<: *if-dev-push
changes: *patterns-component_ut
.rules:test:component_ut-esp32h2-adc:
rules:
- <<: *if-revert-branch
when: never
- <<: *if-protected
- <<: *if-label-build-only
when: never
- <<: *if-label-component_ut
- <<: *if-label-component_ut_esp32h2
- <<: *if-label-target_test
- <<: *if-dev-push
changes: *patterns-component_ut-adc
.rules:test:component_ut-esp32h2-bt:
rules:
- <<: *if-revert-branch
@ -1555,6 +1631,19 @@
- <<: *if-dev-push
changes: *patterns-component_ut
.rules:test:component_ut-esp32s2-adc:
rules:
- <<: *if-revert-branch
when: never
- <<: *if-protected
- <<: *if-label-build-only
when: never
- <<: *if-label-component_ut
- <<: *if-label-component_ut_esp32s2
- <<: *if-label-target_test
- <<: *if-dev-push
changes: *patterns-component_ut-adc
.rules:test:component_ut-esp32s2-bt:
rules:
- <<: *if-revert-branch
@ -1636,6 +1725,19 @@
- <<: *if-dev-push
changes: *patterns-component_ut
.rules:test:component_ut-esp32s3-adc:
rules:
- <<: *if-revert-branch
when: never
- <<: *if-protected
- <<: *if-label-build-only
when: never
- <<: *if-label-component_ut
- <<: *if-label-component_ut_esp32s3
- <<: *if-label-target_test
- <<: *if-dev-push
changes: *patterns-component_ut-adc
.rules:test:component_ut-esp32s3-bt:
rules:
- <<: *if-revert-branch
@ -1715,6 +1817,17 @@
- <<: *if-dev-push
changes: *patterns-custom_test
.rules:test:custom_test-esp32-adc:
rules:
- <<: *if-revert-branch
when: never
- <<: *if-protected
- <<: *if-label-build-only
when: never
- <<: *if-label-custom_test
- <<: *if-label-custom_test_esp32
- <<: *if-label-target_test
.rules:test:custom_test-esp32-bt:
rules:
- <<: *if-revert-branch
@ -1790,6 +1903,17 @@
when: never
- <<: *if-label-custom_test_esp32c2
.rules:test:custom_test-esp32c2-adc:
rules:
- <<: *if-revert-branch
when: never
- <<: *if-protected
- <<: *if-label-build-only
when: never
- <<: *if-label-custom_test
- <<: *if-label-custom_test_esp32c2
- <<: *if-label-target_test
.rules:test:custom_test-esp32c2-bt:
rules:
- <<: *if-revert-branch
@ -1869,6 +1993,17 @@
- <<: *if-dev-push
changes: *patterns-custom_test
.rules:test:custom_test-esp32c3-adc:
rules:
- <<: *if-revert-branch
when: never
- <<: *if-protected
- <<: *if-label-build-only
when: never
- <<: *if-label-custom_test
- <<: *if-label-custom_test_esp32c3
- <<: *if-label-target_test
.rules:test:custom_test-esp32c3-bt:
rules:
- <<: *if-revert-branch
@ -1948,6 +2083,17 @@
- <<: *if-dev-push
changes: *patterns-custom_test
.rules:test:custom_test-esp32h2-adc:
rules:
- <<: *if-revert-branch
when: never
- <<: *if-protected
- <<: *if-label-build-only
when: never
- <<: *if-label-custom_test
- <<: *if-label-custom_test_esp32h2
- <<: *if-label-target_test
.rules:test:custom_test-esp32h2-bt:
rules:
- <<: *if-revert-branch
@ -2027,6 +2173,17 @@
- <<: *if-dev-push
changes: *patterns-custom_test
.rules:test:custom_test-esp32s2-adc:
rules:
- <<: *if-revert-branch
when: never
- <<: *if-protected
- <<: *if-label-build-only
when: never
- <<: *if-label-custom_test
- <<: *if-label-custom_test_esp32s2
- <<: *if-label-target_test
.rules:test:custom_test-esp32s2-bt:
rules:
- <<: *if-revert-branch
@ -2106,6 +2263,17 @@
- <<: *if-dev-push
changes: *patterns-custom_test
.rules:test:custom_test-esp32s3-adc:
rules:
- <<: *if-revert-branch
when: never
- <<: *if-protected
- <<: *if-label-build-only
when: never
- <<: *if-label-custom_test
- <<: *if-label-custom_test_esp32s3
- <<: *if-label-target_test
.rules:test:custom_test-esp32s3-bt:
rules:
- <<: *if-revert-branch
@ -2187,6 +2355,17 @@
- <<: *if-dev-push
changes: *patterns-example_test
.rules:test:example_test-esp32-adc:
rules:
- <<: *if-revert-branch
when: never
- <<: *if-protected
- <<: *if-label-build-only
when: never
- <<: *if-label-example_test
- <<: *if-label-example_test_esp32
- <<: *if-label-target_test
.rules:test:example_test-esp32-bt:
rules:
- <<: *if-revert-branch
@ -2279,6 +2458,17 @@
when: never
- <<: *if-label-example_test_esp32c2
.rules:test:example_test-esp32c2-adc:
rules:
- <<: *if-revert-branch
when: never
- <<: *if-protected
- <<: *if-label-build-only
when: never
- <<: *if-label-example_test
- <<: *if-label-example_test_esp32c2
- <<: *if-label-target_test
.rules:test:example_test-esp32c2-bt:
rules:
- <<: *if-revert-branch
@ -2368,6 +2558,17 @@
- <<: *if-dev-push
changes: *patterns-example_test
.rules:test:example_test-esp32c3-adc:
rules:
- <<: *if-revert-branch
when: never
- <<: *if-protected
- <<: *if-label-build-only
when: never
- <<: *if-label-example_test
- <<: *if-label-example_test_esp32c3
- <<: *if-label-target_test
.rules:test:example_test-esp32c3-bt:
rules:
- <<: *if-revert-branch
@ -2466,6 +2667,17 @@
- <<: *if-dev-push
changes: *patterns-example_test
.rules:test:example_test-esp32h2-adc:
rules:
- <<: *if-revert-branch
when: never
- <<: *if-protected
- <<: *if-label-build-only
when: never
- <<: *if-label-example_test
- <<: *if-label-example_test_esp32h2
- <<: *if-label-target_test
.rules:test:example_test-esp32h2-bt:
rules:
- <<: *if-revert-branch
@ -2555,6 +2767,17 @@
- <<: *if-dev-push
changes: *patterns-example_test
.rules:test:example_test-esp32s2-adc:
rules:
- <<: *if-revert-branch
when: never
- <<: *if-protected
- <<: *if-label-build-only
when: never
- <<: *if-label-example_test
- <<: *if-label-example_test_esp32s2
- <<: *if-label-target_test
.rules:test:example_test-esp32s2-bt:
rules:
- <<: *if-revert-branch
@ -2644,6 +2867,17 @@
- <<: *if-dev-push
changes: *patterns-example_test
.rules:test:example_test-esp32s3-adc:
rules:
- <<: *if-revert-branch
when: never
- <<: *if-protected
- <<: *if-label-build-only
when: never
- <<: *if-label-example_test
- <<: *if-label-example_test_esp32s3
- <<: *if-label-target_test
.rules:test:example_test-esp32s3-bt:
rules:
- <<: *if-revert-branch
@ -2765,6 +2999,17 @@
- <<: *if-dev-push
changes: *patterns-unit_test
.rules:test:unit_test-esp32-adc:
rules:
- <<: *if-revert-branch
when: never
- <<: *if-protected
- <<: *if-label-build-only
when: never
- <<: *if-label-target_test
- <<: *if-label-unit_test
- <<: *if-label-unit_test_esp32
.rules:test:unit_test-esp32-bt:
rules:
- <<: *if-revert-branch
@ -2844,6 +3089,17 @@
when: never
- <<: *if-label-unit_test_esp32c2
.rules:test:unit_test-esp32c2-adc:
rules:
- <<: *if-revert-branch
when: never
- <<: *if-protected
- <<: *if-label-build-only
when: never
- <<: *if-label-target_test
- <<: *if-label-unit_test
- <<: *if-label-unit_test_esp32c2
.rules:test:unit_test-esp32c2-bt:
rules:
- <<: *if-revert-branch
@ -2927,6 +3183,17 @@
- <<: *if-dev-push
changes: *patterns-unit_test
.rules:test:unit_test-esp32c3-adc:
rules:
- <<: *if-revert-branch
when: never
- <<: *if-protected
- <<: *if-label-build-only
when: never
- <<: *if-label-target_test
- <<: *if-label-unit_test
- <<: *if-label-unit_test_esp32c3
.rules:test:unit_test-esp32c3-bt:
rules:
- <<: *if-revert-branch
@ -3010,6 +3277,17 @@
- <<: *if-dev-push
changes: *patterns-unit_test
.rules:test:unit_test-esp32h2-adc:
rules:
- <<: *if-revert-branch
when: never
- <<: *if-protected
- <<: *if-label-build-only
when: never
- <<: *if-label-target_test
- <<: *if-label-unit_test
- <<: *if-label-unit_test_esp32h2
.rules:test:unit_test-esp32h2-bt:
rules:
- <<: *if-revert-branch
@ -3093,6 +3371,17 @@
- <<: *if-dev-push
changes: *patterns-unit_test
.rules:test:unit_test-esp32s2-adc:
rules:
- <<: *if-revert-branch
when: never
- <<: *if-protected
- <<: *if-label-build-only
when: never
- <<: *if-label-target_test
- <<: *if-label-unit_test
- <<: *if-label-unit_test_esp32s2
.rules:test:unit_test-esp32s2-bt:
rules:
- <<: *if-revert-branch
@ -3176,6 +3465,17 @@
- <<: *if-dev-push
changes: *patterns-unit_test
.rules:test:unit_test-esp32s3-adc:
rules:
- <<: *if-revert-branch
when: never
- <<: *if-protected
- <<: *if-label-build-only
when: never
- <<: *if-label-target_test
- <<: *if-label-unit_test
- <<: *if-label-unit_test_esp32s3
.rules:test:unit_test-esp32s3-bt:
rules:
- <<: *if-revert-branch

View File

@ -228,6 +228,14 @@ component_ut_pytest_esp32_generic:
- build_pytest_components_esp32
tags: [ esp32, generic ]
component_ut_pytest_esp32_adc:
extends:
- .pytest_components_dir_template
- .rules:test:component_ut-esp32-adc
needs:
- build_pytest_components_esp32
tags: [ esp32, adc ]
component_ut_pytest_esp32_ip101:
extends:
- .pytest_components_dir_template
@ -268,6 +276,14 @@ component_ut_pytest_esp32s2_generic:
- build_pytest_components_esp32s2
tags: [ esp32s2, generic ]
component_ut_pytest_esp32s2_adc:
extends:
- .pytest_components_dir_template
- .rules:test:component_ut-esp32s2-adc
needs:
- build_pytest_components_esp32s2
tags: [ esp32s2, adc ]
component_ut_pytest_esp32s2_flash_multi:
extends:
- .pytest_components_dir_template
@ -284,6 +300,14 @@ component_ut_pytest_esp32s3_generic:
- build_pytest_components_esp32s3
tags: [ esp32s3, generic ]
component_ut_pytest_esp32s3_adc:
extends:
- .pytest_components_dir_template
- .rules:test:component_ut-esp32s3-adc
needs:
- build_pytest_components_esp32s3
tags: [ esp32s3, adc ]
component_ut_pytest_esp32s3_octal_psram:
extends:
- .pytest_components_dir_template
@ -324,6 +348,14 @@ component_ut_pytest_esp32c2_generic:
- build_pytest_components_esp32c2
tags: [ esp32c2, generic, xtal_40mhz ]
component_ut_pytest_esp32c2_adc:
extends:
- .pytest_components_dir_template
- .rules:test:component_ut-esp32c2-adc
needs:
- build_pytest_components_esp32c2
tags: [ esp32c2, adc ]
component_ut_pytest_esp32c2_xtal_26mhz:
extends:
- .pytest_components_dir_template
@ -340,6 +372,14 @@ component_ut_pytest_esp32c3_generic:
- build_pytest_components_esp32c3
tags: [ esp32c3, generic ]
component_ut_pytest_esp32c3_adc:
extends:
- .pytest_components_dir_template
- .rules:test:component_ut-esp32c3-adc
needs:
- build_pytest_components_esp32c3
tags: [ esp32c3, adc ]
component_ut_pytest_esp32c3_flash_encryption:
extends:
- .pytest_components_dir_template

View File

@ -27,14 +27,14 @@
#elif CONFIG_IDF_TARGET_ESP32S2
#define ADC_TEST_LOW_VAL 0
#define ADC_TEST_LOW_THRESH 25
#define ADC_TEST_LOW_THRESH 35
#define ADC_TEST_HIGH_VAL 8191
#define ADC_TEST_HIGH_THRESH 10
#elif CONFIG_IDF_TARGET_ESP32C3
#define ADC_TEST_LOW_VAL 0
#define ADC_TEST_LOW_THRESH 50
#define ADC_TEST_LOW_THRESH 60 //This is due to ADC2 accuracy is not as good as ADC1, and also we use weak pulldown
#define ADC_TEST_HIGH_VAL 4095
#define ADC_TEST_HIGH_THRESH 10
@ -48,17 +48,11 @@
#elif CONFIG_IDF_TARGET_ESP32C2
#define ADC_TEST_LOW_VAL 2147
#define ADC_TEST_LOW_THRESH 50
#define ADC_TEST_LOW_THRESH 100
#define ADC_TEST_HIGH_VAL 4095
#define ADC_TEST_HIGH_THRESH 0
#elif CONFIG_IDF_TARGET_ESP32H2
#define ADC_TEST_LOW_VAL 2147
#define ADC_TEST_LOW_THRESH 50
#define ADC_TEST_HIGH_VAL 4095
#define ADC_TEST_HIGH_THRESH 0
#endif
//ADC Channels

View File

@ -10,7 +10,7 @@ from pytest_embedded import Dut
@pytest.mark.esp32s3
@pytest.mark.esp32c3
@pytest.mark.esp32c2
@pytest.mark.generic
@pytest.mark.adc
@pytest.mark.parametrize(
'config',
[

View File

@ -72,7 +72,7 @@ void test_adc_calibration_deinit(adc_cali_handle_t handle);
#elif CONFIG_IDF_TARGET_ESP32C3
#define ADC_TEST_LOW_VAL 0
#define ADC_TEST_LOW_THRESH 60
#define ADC_TEST_LOW_THRESH 60 //This is due to ADC2 accuracy is not as good as ADC1, and also we use weak pulldown
#define ADC_TEST_HIGH_VAL 4095
#define ADC_TEST_HIGH_VAL_DMA 4095
@ -88,7 +88,7 @@ void test_adc_calibration_deinit(adc_cali_handle_t handle);
#elif CONFIG_IDF_TARGET_ESP32C2
#define ADC_TEST_LOW_VAL 2147
#define ADC_TEST_LOW_THRESH 50
#define ADC_TEST_LOW_THRESH 100
#define ADC_TEST_HIGH_VAL 4095
#define ADC_TEST_HIGH_THRESH 0

View File

@ -7,10 +7,10 @@ from pytest_embedded import Dut
@pytest.mark.esp32
@pytest.mark.esp32s2
@pytest.mark.esp32c3
@pytest.mark.esp32s3
@pytest.mark.esp32c3
@pytest.mark.esp32c2
@pytest.mark.generic
@pytest.mark.adc
@pytest.mark.parametrize('config', [
'iram_safe',
'release',

View File

@ -62,6 +62,7 @@ markers =
MSPI_F4R8: runner with Quad Flash and Octal PSRAM
MSPI_F4R4: runner with Quad Flash and Quad PSRAM
test_jtag_arm: runner where the chip is accessible through JTAG as well
adc: ADC related tests should run on adc runners
# multi-dut markers
multi_dut_generic: tests should be run on generic runners, at least have two duts connected.