From 4f4f32ecf2062ede537d3892dd6983b39c0b38b0 Mon Sep 17 00:00:00 2001 From: Marius Vikhammer Date: Wed, 18 Oct 2023 14:39:33 +0800 Subject: [PATCH 1/2] ci(system): restrict number of system examples built in regular pipelines --- examples/system/.build-test-rules.yml | 140 +++++++++++++----- examples/system/esp_timer/README.md | 4 +- examples/system/eventfd/pytest_eventfd.py | 8 +- examples/system/heap_task_tracking/README.md | 4 +- examples/system/select/README.md | 4 +- examples/system/select/pytest_select.py | 3 +- .../task_watchdog/pytest_task_watchdog.py | 8 +- 7 files changed, 115 insertions(+), 56 deletions(-) diff --git a/examples/system/.build-test-rules.yml b/examples/system/.build-test-rules.yml index 84e57b7bc9..897380b8bc 100644 --- a/examples/system/.build-test-rules.yml +++ b/examples/system/.build-test-rules.yml @@ -6,6 +6,10 @@ examples/system/app_trace_basic: temporary: true reason: target esp32c6, esp32h2 is not supported yet +examples/system/base_mac_address: + depends_components: + - esp_hw_support + examples/system/console/advanced: disable: - if: IDF_TARGET == "esp32p4" @@ -14,10 +18,16 @@ examples/system/console/advanced: disable_test: - if: IDF_TARGET not in ["esp32", "esp32c3"] reason: Sufficient to run this app on one chip with each architecture + depends_components: + - console + - vfs examples/system/console/advanced_usb_cdc: disable: - if: SOC_USB_PERIPH_NUM == 0 + depends_components: + - console + - vfs examples/system/console/basic: disable: @@ -27,6 +37,9 @@ examples/system/console/basic: disable_test: - if: IDF_TARGET not in ["esp32", "esp32c3"] reason: Sufficient to run this app on one chip with each architecture + depends_components: + - console + - vfs examples/system/deep_sleep: disable: @@ -40,15 +53,31 @@ examples/system/deep_sleep_wake_stub: temporary: true reason: target(s) is not supported yet +examples/system/efuse: + enable: + - if: IDF_TARGET == "esp32" or (NIGHTLY_RUN == "1" and IDF_TARGET != "linux") + reason: no target specific functionality, testing on a single target is sufficient + depends_components: + - efuse + - bootloader_support + examples/system/esp_timer: disable: - - if: IDF_TARGET in ["esp32c6", "esp32h2", "esp32p4"] + - if: IDF_TARGET in ["esp32p4"] temporary: true reason: target(s) is not supported yet # TODO: IDF-7529 + depends_components: + - esp_timer examples/system/eventfd: + enable: + - if: IDF_TARGET == "esp32" or (NIGHTLY_RUN == "1" and IDF_TARGET != "linux") + reason: no target specific functionality, testing on a single target is sufficient disable: - if: SOC_GPTIMER_SUPPORTED != 1 + depends_components: + - vfs + - driver examples/system/flash_suspend: enable: @@ -56,6 +85,13 @@ examples/system/flash_suspend: temporary: true reason: the other targets are not tested yet +examples/system/freertos: + enable: + - if: IDF_TARGET == "esp32" or (NIGHTLY_RUN == "1" and IDF_TARGET != "linux") + reason: no target specific functionality, testing on a single target is sufficient + depends_components: + - freertos + examples/system/gcov: disable_test: - if: IDF_TARGET != "esp32" @@ -69,28 +105,34 @@ examples/system/gdbstub: reason: not supported yet #TODO: IDF-7510 examples/system/heap_task_tracking: - disable: - - if: IDF_TARGET == "esp32c2" or IDF_TARGET == "esp32h2" - temporary: true - reason: target esp32c2, esp32h2 is not supported yet + enable: + - if: IDF_TARGET == "esp32c3" or (NIGHTLY_RUN == "1" and IDF_TARGET != "linux") + reason: no target specific functionality, testing on a single target is sufficient + depends_components: + - heap examples/system/himem: enable: - if: IDF_TARGET == "esp32" - temporary: true - reason: the other targets are not tested yet + reason: Feature is only needed/supported on ESP32 examples/system/ipc/ipc_isr/riscv: enable: - - if: IDF_TARGET in ["esp32p4"] - temporary: true + - if: IDF_TARGET_ARCH_RISCV == 1 and ESP_IPC_ISR_ENABLE == 1 reason: The test is intended only for multi-core chips + disable_test: + - if: IDF_TARGET == "esp32p4" + temporary: true + reason: lack of runners + depends_components: + - esp_system examples/system/ipc/ipc_isr/xtensa: enable: - - if: IDF_TARGET in ["esp32", "esp32s3"] - temporary: true + - if: IDF_TARGET_ARCH_XTENSA == 1 and ESP_IPC_ISR_ENABLE == 1 reason: The test is intended only for multi-core chips + depends_components: + - esp_system examples/system/light_sleep: disable: @@ -147,21 +189,23 @@ examples/system/ota/simple_ota_example: examples/system/perfmon: enable: - if: IDF_TARGET in ["esp32", "esp32s2", "esp32s3"] - temporary: true - reason: the other targets are not tested yet + reason: xtensa only feature + depends_components: + - perfmon + +examples/system/pthread: + enable: + - if: IDF_TARGET == "esp32" or (NIGHTLY_RUN == "1" and IDF_TARGET != "linux") + reason: no target specific functionality, testing on a single target is sufficient + depends_components: + - pthread examples/system/select: - disable: - - if: IDF_TARGET == "esp32c2" - temporary: true - reason: target esp32c2 is not supported yet - disable_test: - - if: IDF_TARGET in ["esp32s2", "esp32s3"] - temporary: true - reason: lack of runners - - if: IDF_TARGET == "esp32c6" or IDF_TARGET == "esp32h2" - temporary: true - reason: target esp32c6 is not supported yet + enable: + - if: IDF_TARGET == "esp32c3" or (NIGHTLY_RUN == "1" and IDF_TARGET != "linux") + reason: no target specific functionality, testing on a single target is sufficient + depends_components: + - vfs examples/system/sysview_tracing: disable: @@ -186,72 +230,100 @@ examples/system/sysview_tracing_heap_log: reason: lack of runners examples/system/task_watchdog: - disable_test: - - if: IDF_TARGET == "esp32c2" - temporary: true - reason: target esp32c2 is not supported yet + enable: + - if: IDF_TARGET == "esp32" or (NIGHTLY_RUN == "1" and IDF_TARGET != "linux") + reason: no target specific functionality, testing on a single target is sufficient + depends_components: + - esp_system examples/system/ulp/lp_core/gpio: enable: - if: SOC_LP_CORE_SUPPORTED == 1 + depends_components: + - ulp examples/system/ulp/lp_core/lp_i2c: enable: - if: SOC_LP_I2C_SUPPORTED == 1 + depends_components: + - ulp examples/system/ulp/lp_core/lp_uart/lp_uart_echo: disable: - if: SOC_ULP_LP_UART_SUPPORTED != 1 + depends_components: + - ulp examples/system/ulp/lp_core/lp_uart/lp_uart_print: disable: - if: SOC_ULP_LP_UART_SUPPORTED != 1 + depends_components: + - ulp examples/system/ulp/ulp_fsm/ulp: disable: - if: SOC_ULP_FSM_SUPPORTED != 1 + depends_components: + - ulp examples/system/ulp/ulp_fsm/ulp_adc: enable: - if: IDF_TARGET in ["esp32", "esp32s3"] temporary: true reason: the other targets are not tested yet + depends_components: + - ulp examples/system/ulp/ulp_riscv/adc: enable: - if: SOC_RISCV_COPROC_SUPPORTED == 1 - temporary: true - reason: the other targets are not tested yet + depends_components: + - ulp examples/system/ulp/ulp_riscv/ds18b20_onewire: enable: - if: IDF_TARGET == "esp32s2" temporary: true reason: the other targets are not tested yet + depends_components: + - ulp examples/system/ulp/ulp_riscv/gpio: enable: - if: SOC_RISCV_COPROC_SUPPORTED == 1 - temporary: true - reason: the other targets are not tested yet + depends_components: + - ulp examples/system/ulp/ulp_riscv/gpio_interrupt: enable: - if: SOC_RISCV_COPROC_SUPPORTED == 1 - temporary: true - reason: the other targets are not tested yet + depends_components: + - ulp examples/system/ulp/ulp_riscv/i2c: enable: - if: SOC_RISCV_COPROC_SUPPORTED == 1 + depends_components: + - ulp examples/system/ulp/ulp_riscv/touch: enable: - if: SOC_RISCV_COPROC_SUPPORTED == 1 + depends_components: + - ulp examples/system/ulp/ulp_riscv/uart_print: enable: - if: SOC_RISCV_COPROC_SUPPORTED == 1 + depends_components: + - ulp + +examples/system/unit_test/: + enable: + - if: IDF_TARGET == "esp32" or (NIGHTLY_RUN == "1" and IDF_TARGET != "linux") + reason: no target specific functionality, testing on a single target is sufficient + depends_components: + - unity examples/system/xip_from_psram: enable: diff --git a/examples/system/esp_timer/README.md b/examples/system/esp_timer/README.md index 6a6a075bf6..6346949348 100644 --- a/examples/system/esp_timer/README.md +++ b/examples/system/esp_timer/README.md @@ -1,5 +1,5 @@ -| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-S2 | ESP32-S3 | -| ----------------- | ----- | -------- | -------- | -------- | -------- | +| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-H2 | ESP32-S2 | ESP32-S3 | +| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- | # High Resolution Timer Example (`esp_timer`) diff --git a/examples/system/eventfd/pytest_eventfd.py b/examples/system/eventfd/pytest_eventfd.py index 3bdb1d5bcc..8c0aa6a104 100644 --- a/examples/system/eventfd/pytest_eventfd.py +++ b/examples/system/eventfd/pytest_eventfd.py @@ -8,13 +8,7 @@ import pytest from pytest_embedded import Dut -@pytest.mark.esp32 -@pytest.mark.esp32c2 -@pytest.mark.esp32s2 -@pytest.mark.esp32s3 -@pytest.mark.esp32c3 -@pytest.mark.esp32c6 -@pytest.mark.esp32h2 +@pytest.mark.supported_targets @pytest.mark.generic def test_eventfd(dut: Dut) -> None: diff --git a/examples/system/heap_task_tracking/README.md b/examples/system/heap_task_tracking/README.md index 5113b3ea46..755d754fc5 100644 --- a/examples/system/heap_task_tracking/README.md +++ b/examples/system/heap_task_tracking/README.md @@ -1,5 +1,5 @@ -| Supported Targets | ESP32 | ESP32-C3 | ESP32-C6 | ESP32-P4 | ESP32-S2 | ESP32-S3 | -| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | +| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-H2 | ESP32-P4 | ESP32-S2 | ESP32-S3 | +| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | # Heap Task Tracking Example diff --git a/examples/system/select/README.md b/examples/system/select/README.md index 4518f097bb..3abeb838b3 100644 --- a/examples/system/select/README.md +++ b/examples/system/select/README.md @@ -1,5 +1,5 @@ -| Supported Targets | ESP32 | ESP32-C3 | ESP32-C6 | ESP32-H2 | ESP32-P4 | ESP32-S2 | ESP32-S3 | -| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- | +| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-H2 | ESP32-P4 | ESP32-S2 | ESP32-S3 | +| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | # Synchronous I/O multiplexing example diff --git a/examples/system/select/pytest_select.py b/examples/system/select/pytest_select.py index 3cefe3eb15..367739d8eb 100644 --- a/examples/system/select/pytest_select.py +++ b/examples/system/select/pytest_select.py @@ -20,8 +20,7 @@ def get_uart_msgs(i: int) -> List[str]: 'uart_select_example: {} bytes were received through UART1: {}'.format(len(msg), msg)] -@pytest.mark.esp32 -@pytest.mark.esp32c3 +@pytest.mark.supported_targets @pytest.mark.generic def test_examples_select(dut: Dut) -> None: diff --git a/examples/system/task_watchdog/pytest_task_watchdog.py b/examples/system/task_watchdog/pytest_task_watchdog.py index 91028453ce..0627967675 100644 --- a/examples/system/task_watchdog/pytest_task_watchdog.py +++ b/examples/system/task_watchdog/pytest_task_watchdog.py @@ -5,13 +5,7 @@ import pytest from pytest_embedded import Dut -# IDF-5055 -@pytest.mark.esp32 -@pytest.mark.esp32s2 -@pytest.mark.esp32s3 -@pytest.mark.esp32c3 -@pytest.mark.esp32c6 -@pytest.mark.esp32h2 +@pytest.mark.supported_targets @pytest.mark.generic def test_task_watchdog(dut: Dut) -> None: From eb37150780cd0943247c47b206abda9d15f10359 Mon Sep 17 00:00:00 2001 From: Fu Hanxi Date: Wed, 18 Oct 2023 10:23:19 +0200 Subject: [PATCH 2/2] ci: add all nightly run env vars while checking --- .gitlab/ci/common.yml | 1 + examples/system/.build-test-rules.yml | 8 +++++++- tools/ci/check_build_test_rules.py | 2 ++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.gitlab/ci/common.yml b/.gitlab/ci/common.yml index 1d661428c0..56b2a767fc 100644 --- a/.gitlab/ci/common.yml +++ b/.gitlab/ci/common.yml @@ -97,6 +97,7 @@ variables: if echo "$CI_MERGE_REQUEST_LABELS" | egrep "(^|,)include_nightly_run(,|$)"; then export INCLUDE_NIGHTLY_RUN="1" + export NIGHTLY_RUN="1" fi # configure cmake related flags diff --git a/examples/system/.build-test-rules.yml b/examples/system/.build-test-rules.yml index 897380b8bc..10fc5a1537 100644 --- a/examples/system/.build-test-rules.yml +++ b/examples/system/.build-test-rules.yml @@ -66,6 +66,10 @@ examples/system/esp_timer: - if: IDF_TARGET in ["esp32p4"] temporary: true reason: target(s) is not supported yet # TODO: IDF-7529 + disable_test: + - if: IDF_TARGET in ["esp32c6", "esp32h2"] + temporary: true + reason: lack of runner depends_components: - esp_timer @@ -188,8 +192,10 @@ examples/system/ota/simple_ota_example: examples/system/perfmon: enable: - - if: IDF_TARGET in ["esp32", "esp32s2", "esp32s3"] + - if: IDF_TARGET in ["esp32", "esp32s2", "esp32s3"] and NIGHTLY_RUN == "1" reason: xtensa only feature + - if: IDF_TARGET == "esp32" + reason: testing on a single target is sufficient depends_components: - perfmon diff --git a/tools/ci/check_build_test_rules.py b/tools/ci/check_build_test_rules.py index 11e964d1cb..080ce2ad55 100755 --- a/tools/ci/check_build_test_rules.py +++ b/tools/ci/check_build_test_rules.py @@ -481,6 +481,7 @@ if __name__ == '__main__': ) if arg.action == 'check-readmes': + os.environ['INCLUDE_NIGHTLY_RUN'] = '1' os.environ['NIGHTLY_RUN'] = '1' check_readme( list(check_dirs), @@ -489,6 +490,7 @@ if __name__ == '__main__': ) elif arg.action == 'check-test-scripts': os.environ['INCLUDE_NIGHTLY_RUN'] = '1' + os.environ['NIGHTLY_RUN'] = '1' check_test_scripts( list(check_dirs), exclude_dirs=_exclude_dirs,