Skip to content

Commit 9e60322

Browse files
authored
Merge branch 'master' into camera-push
2 parents 2d54b4b + b880c14 commit 9e60322

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+195
-537
lines changed

.github/workflows/tests.yaml

+17-15
Original file line numberDiff line numberDiff line change
@@ -521,24 +521,26 @@ jobs:
521521
echo "TRACE_TEST_JSON: out/trace_data/test-{SCRIPT_BASE_NAME}" >> /tmp/test_env.yaml
522522
echo "TRACE_TEST_PERFETTO: out/trace_data/test-{SCRIPT_BASE_NAME}" >> /tmp/test_env.yaml
523523
524+
- name: Verify Testing Support
525+
run: |
526+
scripts/run_in_python_env.sh out/venv 'python3 src/python_testing/test_testing/test_IDM_10_4.py'
527+
scripts/run_in_python_env.sh out/venv 'python3 src/python_testing/test_testing/test_TC_ICDM_2_1.py'
528+
scripts/run_in_python_env.sh out/venv 'python3 src/python_testing/test_testing/test_TC_SC_7_1.py'
529+
scripts/run_in_python_env.sh out/venv 'python3 src/python_testing/test_testing/TestDecorators.py'
530+
scripts/run_in_python_env.sh out/venv 'python3 src/python_testing/TestChoiceConformanceSupport.py'
531+
scripts/run_in_python_env.sh out/venv 'python3 src/python_testing/TestConformanceSupport.py'
532+
scripts/run_in_python_env.sh out/venv 'python3 src/python_testing/TestConformanceTest.py'
533+
scripts/run_in_python_env.sh out/venv 'python3 src/python_testing/TestIdChecks.py'
534+
scripts/run_in_python_env.sh out/venv 'python3 src/python_testing/TestMatterTestingSupport.py'
535+
scripts/run_in_python_env.sh out/venv 'python3 src/python_testing/TestSpecParsingDeviceType.py'
536+
scripts/run_in_python_env.sh out/venv 'python3 src/python_testing/TestSpecParsingSupport.py'
537+
524538
- name: Run Tests
525539
run: |
526540
mkdir -p out/trace_data
527-
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/controller/python/test/test_scripts/mobile-device-test.py'
528-
scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/execute_python_tests.py --env-file /tmp/test_env.yaml --search-directory src/python_testing'
529-
scripts/run_in_python_env.sh out/venv './scripts/tests/TestTimeSyncTrustedTimeSourceRunner.py --all-clusters out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app'
530-
scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/TestIdChecks.py'
531-
scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/TestSpecParsingDeviceType.py'
532-
scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/TestConformanceSupport.py'
533-
scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/TestConformanceTest.py'
534-
scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/TestChoiceConformanceSupport.py'
535-
scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/TestMatterTestingSupport.py'
536-
scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/TestSpecParsingSupport.py'
537-
scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/test_testing/test_TC_ICDM_2_1.py'
538-
scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/test_testing/test_IDM_10_4.py'
539-
scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/test_testing/test_TC_SC_7_1.py'
540-
scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/test_testing/TestDecorators.py'
541-
541+
scripts/run_in_python_env.sh out/venv 'scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/controller/python/test/test_scripts/mobile-device-test.py'
542+
scripts/run_in_python_env.sh out/venv 'src/python_testing/execute_python_tests.py --env-file /tmp/test_env.yaml --search-directory src/python_testing'
543+
scripts/run_in_python_env.sh out/venv 'scripts/tests/TestTimeSyncTrustedTimeSourceRunner.py --all-clusters out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app'
542544
543545
- name: Uploading core files
544546
uses: actions/upload-artifact@v4

config/esp32/components/chip/CMakeLists.txt

+16-162
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,7 @@ endif()
3131

3232
include(${CMAKE_CURRENT_LIST_DIR}/ota-image.cmake)
3333

34-
set(CHIP_REQUIRE_COMPONENTS esp_eth freertos lwip bt mbedtls fatfs app_update console openthread nvs_flash spi_flash)
35-
36-
if(NOT "${IDF_TARGET}" STREQUAL "esp32h2")
37-
list(APPEND CHIP_REQUIRE_COMPONENTS mdns)
38-
endif()
34+
set(CHIP_REQUIRE_COMPONENTS esp_eth freertos lwip bt mbedtls fatfs app_update console openthread nvs_flash spi_flash mdns)
3935

4036
if (NOT CMAKE_BUILD_EARLY_EXPANSION)
4137
if (CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_DISABLE)
@@ -314,6 +310,10 @@ if (CONFIG_CHIP_DEVICE_ENABLE_DYNAMIC_SERVER)
314310
chip_gn_arg_append("chip_build_controller_dynamic_server" "true")
315311
endif()
316312

313+
if (CONFIG_ICD_MAX_NOTIFICATION_SUBSCRIBERS)
314+
chip_gn_arg_append("icd_max_notification_subscribers" ${CONFIG_ICD_MAX_NOTIFICATION_SUBSCRIBERS})
315+
endif()
316+
317317
set(args_gn_input "${CMAKE_CURRENT_BINARY_DIR}/args.gn.in")
318318
file(GENERATE OUTPUT "${args_gn_input}" CONTENT "${chip_gn_args}")
319319

@@ -420,170 +420,24 @@ target_include_directories(${COMPONENT_LIB} INTERFACE
420420
"${CHIP_ROOT}/config/esp32/${CONFIG_CHIP_EXTERNAL_PLATFORM_DIR}/../../"
421421
)
422422

423-
idf_component_get_property(mbedtls_lib mbedtls COMPONENT_LIB)
424-
425-
idf_build_get_property(idf_target IDF_TARGET)
426-
set(target_name "${idf_target}")
427-
428-
if(CONFIG_BT_ENABLED)
429-
idf_component_get_property(bt_lib bt COMPONENT_LIB)
430-
if((target_name STREQUAL "esp32h2") OR (target_name STREQUAL "esp32c2") OR (target_name STREQUAL "esp32c6"))
431-
idf_component_get_property(bt_dir bt COMPONENT_DIR)
432-
list(APPEND chip_libraries $<TARGET_FILE:${bt_lib}>)
433-
if (EXISTS ${bt_dir}/controller/lib_${target_name}/${target_name}-bt-lib/libble_app.a)
434-
list(APPEND chip_libraries "${bt_dir}/controller/lib_${target_name}/${target_name}-bt-lib/libble_app.a")
435-
elseif(EXISTS ${bt_dir}/controller/lib_${target_name}/${target_name}-bt-lib/${target_name}/libble_app.a)
436-
list(APPEND chip_libraries "${bt_dir}/controller/lib_${target_name}/${target_name}-bt-lib/${target_name}/libble_app.a")
437-
else()
438-
message(WARNING "There is no libble_app.a in the given path")
439-
endif()
440-
elseif(target_name STREQUAL "esp32p4")
441-
list(APPEND chip_libraries $<TARGET_FILE:${bt_lib}>)
442-
else()
443-
list(APPEND chip_libraries $<TARGET_FILE:${bt_lib}> -lbtdm_app)
444-
endif()
445-
endif()
446-
447-
if (CONFIG_ENABLE_CHIP_SHELL)
448-
idf_component_get_property(console_lib console COMPONENT_LIB)
449-
list(APPEND chip_libraries $<TARGET_FILE:${console_lib}>)
450-
endif()
451-
452-
if(CONFIG_OPENTHREAD_ENABLED)
453-
idf_component_get_property(openthread_lib openthread COMPONENT_LIB)
454-
list(APPEND chip_libraries $<TARGET_FILE:${openthread_lib}>)
455-
if (CONFIG_IEEE802154_ENABLED)
456-
idf_component_get_property(ieee802154_lib ieee802154 COMPONENT_LIB)
457-
list(APPEND chip_libraries $<TARGET_FILE:${ieee802154_lib}>)
458-
endif()
459-
endif()
460-
461-
if(NOT CONFIG_USE_MINIMAL_MDNS)
462-
idf_build_get_property(build_components BUILD_COMPONENTS)
463-
# For IDF v5.x, the mdns component was moved to idf_managed_components.
464-
# We should use 'espressif__mdns' for 'idf_component_get_property'.
465-
if("espressif__mdns" IN_LIST build_components)
466-
idf_component_get_property(mdns_lib espressif__mdns COMPONENT_LIB)
467-
list(APPEND chip_libraries $<TARGET_FILE:${mdns_lib}>)
468-
elseif("mdns" IN_LIST build_components)
469-
idf_component_get_property(mdns_lib mdns COMPONENT_LIB)
470-
list(APPEND chip_libraries $<TARGET_FILE:${mdns_lib}>)
471-
endif()
472-
endif()
473-
474-
if(CONFIG_OPENTHREAD_BORDER_ROUTER)
475-
idf_component_get_property(rcp_update_lib espressif__esp_rcp_update COMPONENT_LIB)
476-
list(APPEND chip_libraries $<TARGET_FILE:${rcp_update_lib}>)
477-
idf_component_get_property(serial_flasher_lib espressif__esp-serial-flasher COMPONENT_LIB)
478-
list(APPEND chip_libraries $<TARGET_FILE:${serial_flasher_lib}>)
479-
endif()
480-
481-
if (CONFIG_ENABLE_ENCRYPTED_OTA)
482-
idf_component_get_property(esp_encrypted_img_lib espressif__esp_encrypted_img COMPONENT_LIB)
483-
list(APPEND chip_libraries $<TARGET_FILE:${esp_encrypted_img_lib}>)
484-
endif()
485-
486-
# Let user set EXECUTABLE_COMPONENT_NAME and defaults to main if not specified
487-
if (NOT EXECUTABLE_COMPONENT_NAME)
488-
set(EXECUTABLE_COMPONENT_NAME "main")
489-
endif()
490-
491-
if (CONFIG_ENABLE_DELTA_OTA)
492-
idf_component_get_property(esp_delta_ota_lib espressif__esp_delta_ota COMPONENT_LIB)
493-
list(APPEND chip_libraries $<TARGET_FILE:${esp_delta_ota_lib}>)
494-
endif()
495-
496-
idf_component_get_property(main_lib ${EXECUTABLE_COMPONENT_NAME} COMPONENT_LIB)
497-
list(APPEND chip_libraries $<TARGET_FILE:${main_lib}>)
498-
499-
if (CONFIG_SEC_CERT_DAC_PROVIDER)
500-
idf_component_get_property(esp32_secure_cert_mgr_lib espressif__esp_secure_cert_mgr COMPONENT_LIB)
501-
list(APPEND chip_libraries $<TARGET_FILE:${esp32_secure_cert_mgr_lib}>)
502-
endif()
503-
504-
if (CONFIG_ENABLE_ESP_INSIGHTS_TRACE)
505-
idf_build_get_property(build_components BUILD_COMPONENTS)
506-
# esp_insights can be used as an independent component or through component manager so,
507-
# We should check and add the right component.
508-
if("espressif__esp_insights" IN_LIST build_components)
509-
idf_component_get_property(esp_insights_lib espressif__esp_insights COMPONENT_LIB)
510-
elseif("esp_insights" IN_LIST build_components)
511-
idf_component_get_property(esp_insights_lib esp_insights COMPONENT_LIB)
512-
endif()
513-
514-
list(APPEND chip_libraries $<TARGET_FILE:${esp_insights_lib}>)
515-
endif()
516-
517-
idf_component_get_property(lwip_lib lwip COMPONENT_LIB)
518-
list(APPEND chip_libraries $<TARGET_FILE:${lwip_lib}>)
519-
520-
if ("${IDF_VERSION_MAJOR}.${IDF_VERSION_MINOR}" VERSION_GREATER_EQUAL "5.3" OR CONFIG_ESP32_WIFI_ENABLED)
521-
idf_component_get_property(esp_wifi_lib esp_wifi COMPONENT_LIB)
522-
list(APPEND chip_libraries $<TARGET_FILE:${esp_wifi_lib}>)
523-
endif()
524-
525-
if (CONFIG_ESP32_WIFI_ENABLED)
526-
idf_component_get_property(esp_wifi_dir esp_wifi COMPONENT_DIR)
527-
if (CONFIG_IDF_TARGET_ESP32C2)
528-
set(blobs core net80211 pp)
529-
else()
530-
set(blobs core mesh net80211 pp)
531-
endif()
532-
533-
foreach(blob ${blobs})
534-
list(APPEND chip_libraries "${esp_wifi_dir}/lib/${target_name}/lib${blob}.a")
535-
endforeach()
536-
537-
idf_component_get_property(wpa_supplicant_lib wpa_supplicant COMPONENT_LIB)
538-
list(APPEND chip_libraries $<TARGET_FILE:${wpa_supplicant_lib}>)
539-
endif()
540-
541-
if (CONFIG_ETH_ENABLED)
542-
idf_component_get_property(esp_eth_lib esp_eth COMPONENT_LIB)
543-
list(APPEND chip_libraries $<TARGET_FILE:${esp_eth_lib}>)
423+
set(matter_requires lwip freertos console bt)
424+
idf_build_get_property(build_components BUILD_COMPONENTS)
425+
if("espressif__mdns" IN_LIST build_components)
426+
list(APPEND matter_requires espressif__mdns)
427+
elseif("mdns" IN_LIST build_components)
428+
list(APPEND matter_requires mdns)
544429
endif()
545430

546-
idf_component_get_property(esp_netif_lib esp_netif COMPONENT_LIB)
547-
list(APPEND chip_libraries $<TARGET_FILE:${esp_netif_lib}>)
548-
549-
idf_component_get_property(esp_hw_support_lib esp_hw_support COMPONENT_LIB)
550-
list(APPEND chip_libraries $<TARGET_FILE:${esp_hw_support_lib}>)
551-
552-
if (NOT CONFIG_IDF_TARGET_ESP32P4)
553-
idf_component_get_property(esp_phy_lib esp_phy COMPONENT_LIB)
554-
idf_component_get_property(esp_phy_dir esp_phy COMPONENT_DIR)
555-
list(APPEND chip_libraries $<TARGET_FILE:${esp_phy_lib}>)
556-
557-
if (CONFIG_IDF_TARGET_ESP32)
558-
set(phy_blobs phy rtc)
559-
elseif (CONFIG_IDF_TARGET_ESP32S2)
560-
set(phy_blobs phy)
561-
else()
562-
set(phy_blobs phy btbb)
563-
endif()
564-
foreach(phy_blob ${phy_blobs})
565-
list(APPEND chip_libraries "${esp_phy_dir}/lib/${target_name}/lib${phy_blob}.a")
566-
endforeach()
431+
if (CONFIG_OPENTHREAD_BORDER_ROUTER)
432+
list(APPEND matter_requires espressif__esp_rcp_update)
567433
endif()
568434

569-
set(components_to_link esp_event hal esp_system soc efuse vfs driver freertos esp_timer)
570-
if (NOT CONFIG_IDF_TARGET_ESP32P4)
571-
list(APPEND components_to_link esp_coex)
572-
endif()
573-
idf_build_get_property(build_components BUILD_COMPONENTS)
574-
foreach(component ${components_to_link})
575-
# Some of the components are not present in IDF v4.x
576-
# So, Check if the component is in the list of build components
577-
if("${component}" IN_LIST build_components)
578-
idf_component_get_property(lib_name ${component} COMPONENT_LIB)
579-
list(APPEND chip_libraries $<TARGET_FILE:${lib_name}>)
580-
endif()
581-
endforeach()
435+
add_prebuilt_library(matterlib "${CMAKE_CURRENT_BINARY_DIR}/lib/libCHIP.a"
436+
REQUIRES ${matter_requires})
582437

583438
target_link_libraries(${COMPONENT_LIB} INTERFACE -Wl,--start-group
584439
${chip_libraries}
585-
$<TARGET_FILE:mbedcrypto> $<TARGET_FILE:mbedx509>
586-
$<TARGET_FILE:${mbedtls_lib}>
440+
matterlib
587441
-Wl,--end-group)
588442

589443
# Make the component dependent on our CHIP build

0 commit comments

Comments
 (0)