Skip to content

Commit 8f0d1d2

Browse files
Sync csa branch with main (#851)
2 parents f1a6fa1 + ea4125a commit 8f0d1d2

File tree

1,015 files changed

+44553
-14849
lines changed

Some content is hidden

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

1,015 files changed

+44553
-14849
lines changed

.devcontainer/Dockerfile

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,25 @@ ENV LANG=en_US.utf8
3232
RUN apt-get update \
3333
&& apt-get install -y locales \
3434
&& localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 \
35-
&& apt-get -fy install vim emacs sudo \
36-
apt-utils dialog zsh \
37-
lsb-release \
38-
bash-completion \
39-
valgrind \
40-
docker.io \
41-
iputils-ping \
42-
icecc \
43-
# emacs pulls in libgccjit0 -> libgcc-14-dev without libstdc++-14-dev which causes clang++ to fail \
44-
# See-Also: https://bugs.launchpad.net/ubuntu/+source/llvm-defaults/+bug/2077130 \
45-
libstdc++-14-dev \
35+
&& apt-get -fy install \
36+
apt-utils \
37+
bash-completion \
38+
dialog \
39+
docker.io \
40+
emacs \
41+
fish \
42+
gnupg2 \
43+
icecc \
44+
iputils-ping \
45+
lsb-release \
46+
openssh-client \
47+
sudo \
48+
valgrind \
49+
vim \
50+
zsh \
51+
# emacs pulls in libgccjit0 -> libgcc-14-dev without libstdc++-14-dev which causes clang++ to fail \
52+
# See-Also: https://bugs.launchpad.net/ubuntu/+source/llvm-defaults/+bug/2077130 \
53+
libstdc++-14-dev \
4654
&& :
4755

4856
RUN (getent passwd $USER_UID && userdel -f $(getent passwd $USER_UID | cut -d: -f1) || true) \

.github/.wordlist.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -711,6 +711,7 @@ ICD
711711
ICDs
712712
iCloud
713713
ICMP
714+
idempotency
714715
IDF
715716
IDL
716717
IDLs
@@ -956,6 +957,7 @@ MLD
956957
mmevk
957958
moal
958959
Mobly
960+
Mockito
959961
ModeSelect
960962
modprobe
961963
Modustoolbox
@@ -1037,6 +1039,7 @@ nwk
10371039
NXP
10381040
objcopy
10391041
OccupancySensing
1042+
OCMock
10401043
OctetString
10411044
OECORE
10421045
OID
@@ -1242,6 +1245,9 @@ Realtek
12421245
rebase
12431246
recommand
12441247
recommanded
1248+
Reconnection
1249+
reconnection
1250+
reconnections
12451251
recurse
12461252
refrigeratoralarm
12471253
regen

.github/workflows/build.yaml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,13 +197,23 @@ jobs:
197197
CHIP_ROOT_PATH=examples/placeholder/linux
198198
CHIP_ROOT_PATH="$CHIP_ROOT_PATH" BUILD_TYPE="$BUILD_TYPE" scripts/build/gn_gen.sh --args="$GN_ARGS"
199199
scripts/run_in_build_env.sh "ninja -C ./out/$BUILD_TYPE"
200-
- name: Setup Build, Run Build and Run Tests
200+
- name: Setup Build, Run Build and Run Tests (gcc_release)
201+
# Running gcc_release tests on pull requests is redundant
202+
# it is unlikely to find extra issues beyond the other unit tests already run on PRs.
203+
# Instead keep this run for master only
204+
if: github.event.pull_request.number == null
201205
run: |
202206
BUILD_TYPE=gcc_release scripts/build/gn_gen.sh --args="is_debug=false"
203207
scripts/run_in_build_env.sh "ninja -C ./out/gcc_release"
204208
BUILD_TYPE=gcc_release scripts/tests/gn_tests.sh
205209
- name: Clean output
206210
run: rm -rf ./out
211+
- name: Build and run AddressSanitizer (ASAN) unit tests (Pull Requests only)
212+
if: github.event_name == 'pull_request'
213+
run: |
214+
./scripts/run_in_build_env.sh \
215+
"./scripts/build/build_examples.py --target linux-x64-tests-asan-clang build \
216+
&& rm -rf out/linux-x64-tests-asan-clang"
207217
- name: Run Tests with sanitizers
208218
# Sanitizer tests are not likely to find extra issues so running the same tests
209219
# as above repeatedly on every pull request seems extra time. Instead keep this run

.github/workflows/darwin-tests.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ jobs:
115115
--target darwin-${{matrix.arch}}-network-manager-${BUILD_VARIANT} \
116116
--target darwin-${{matrix.arch}}-energy-gateway-${BUILD_VARIANT} \
117117
--target darwin-${{matrix.arch}}-evse-${BUILD_VARIANT} \
118+
--target darwin-${{matrix.arch}}-water-heater-${BUILD_VARIANT} \
118119
--target darwin-${{matrix.arch}}-all-devices-${BUILD_VARIANT} \
119120
build \
120121
--copy-artifacts-to objdir-clone \
@@ -125,6 +126,7 @@ jobs:
125126
"./scripts/tests/run_test_suite.py \
126127
--runner darwin_framework_tool_python \
127128
--target-skip-glob '{TestAccessControlConstraints}' \
129+
--test-order random \
128130
run \
129131
--iterations 1 \
130132
--test-timeout-seconds 120 \
@@ -142,6 +144,7 @@ jobs:
142144
--app-path network-manager:./objdir-clone/darwin-${{matrix.arch}}-network-manager-${BUILD_VARIANT}/matter-network-manager-app \
143145
--app-path energy-gateway:./objdir-clone/darwin-${{matrix.arch}}-energy-gateway-${BUILD_VARIANT}/chip-energy-gateway-app \
144146
--app-path evse:./objdir-clone/darwin-${{matrix.arch}}-evse-${BUILD_VARIANT}/chip-evse-app \
147+
--app-path water-heater:./objdir-clone/darwin-${{matrix.arch}}-water-heater-${BUILD_VARIANT}/matter-water-heater-app \
145148
"
146149
- name: Run OTA Test
147150
run: |

.github/workflows/examples-esp32.yaml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,10 @@ jobs:
146146
scripts/examples/esp_example.sh lighting-app sdkconfig.wifi_thread.defaults esp32c6
147147
rm -rf examples/lighting-app/esp32/{build,managed_components}
148148
149+
- name: Build example All Clusters App (Target:ESP32P4, Ethernet)
150+
run: |
151+
scripts/examples/esp_example.sh all-clusters-app sdkconfig.eth.esp32p4 esp32p4
152+
rm -rf examples/all-clusters-app/esp32/{build,managed_components}
149153
150154
- name: Build example Lighting App (external platform)
151155
run: |
@@ -158,12 +162,18 @@ jobs:
158162
scripts/examples/esp_example.sh energy-gateway-app sdkconfig.defaults
159163
rm -rf examples/energy-gateway-app/esp32/{build,managed_components}
160164
161-
- name: Build example Energy Management App
162-
if: steps.changed_paths.outputs.energy_management == 'true'
165+
- name: Build example EVSE App
166+
if: steps.changed_paths.outputs.evse == 'true'
163167
run: |
164168
scripts/examples/esp_example.sh evse-app sdkconfig.defaults
165169
rm -rf examples/evse-app/esp32/{build,managed_components}
166170
171+
- name: Build example Water Heater App
172+
if: steps.changed_paths.outputs.water_heater == 'true'
173+
run: |
174+
scripts/examples/esp_example.sh water-heater-app sdkconfig.defaults
175+
rm -rf examples/water-heater-app/esp32/{build,managed_components}
176+
167177
- name: Uploading Size Reports
168178
uses: ./.github/actions/upload-size-reports
169179
if: ${{ !env.ACT }}
@@ -193,6 +203,9 @@ jobs:
193203
- name: Build example Bridge App
194204
run: scripts/examples/esp_example.sh bridge-app
195205

206+
- name: Build example All Devices App
207+
run: scripts/examples/esp_example.sh all-devices-app sdkconfig.defaults
208+
196209
- name: Build example Persistent Storage App
197210
run: scripts/examples/esp_example.sh persistent-storage sdkconfig.defaults
198211

.github/workflows/tests.yaml

Lines changed: 48 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161
runs-on: ubuntu-latest
6262

6363
container:
64-
image: ghcr.io/project-chip/chip-build:181
64+
image: ghcr.io/project-chip/chip-build:184
6565
options: >-
6666
--privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0
6767
net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1"
@@ -120,6 +120,7 @@ jobs:
120120
--log-level info \
121121
src/app/zap-templates/zcl/data-model/chip/global-attributes.xml \
122122
src/app/zap-templates/zcl/data-model/chip/ambient-context-sensing-cluster.xml \
123+
src/app/zap-templates/zcl/data-model/chip/boolean-state-configuration-cluster.xml \
123124
src/app/zap-templates/zcl/data-model/chip/bridged-device-basic-information-cluster.xml \
124125
src/app/zap-templates/zcl/data-model/chip/chime-cluster.xml \
125126
src/app/zap-templates/zcl/data-model/chip/closure-control-cluster.xml \
@@ -282,6 +283,7 @@ jobs:
282283
--target linux-x64-chip-tool${CHIP_TOOL_VARIANT}-${BUILD_VARIANT} \
283284
--target linux-x64-all-clusters-${BUILD_VARIANT} \
284285
--target linux-x64-all-clusters-no-wifi-openthread-endpoint-${BUILD_VARIANT} \
286+
--target linux-x64-all-clusters-no-wifi-no-ble-openthread-endpoint-${BUILD_VARIANT} \
285287
--target linux-x64-ota-requestor-${BUILD_VARIANT} \
286288
--target linux-x64-tv-app-${BUILD_VARIANT} \
287289
--pw-command-launcher=ccache \
@@ -299,6 +301,7 @@ jobs:
299301
--target linux-x64-energy-gateway-${BUILD_VARIANT} \
300302
--target linux-x64-all-devices-${BUILD_VARIANT} \
301303
--target linux-x64-evse-${BUILD_VARIANT} \
304+
--target linux-x64-water-heater-${BUILD_VARIANT} \
302305
--pw-command-launcher=ccache \
303306
build \
304307
--copy-artifacts-to objdir-clone \
@@ -313,6 +316,8 @@ jobs:
313316
-DCMAKE_BUILD_TYPE=Debug \
314317
-DOTBR_BORDER_ROUTING=ON \
315318
-DOTBR_MDNS=openthread \
319+
-DOTBR_VENDOR_NAME=MatterTest \
320+
-DOTBR_PRODUCT_NAME=MatterTest \
316321
-DOT_POSIX_SETTINGS_PATH='\"tmp\"' \
317322
-DOT_FIREWALL=OFF \
318323
-DOT_LOG_LEVEL=INFO \
@@ -347,9 +352,6 @@ jobs:
347352
"
348353
349354
- name: Run BLE-Thread commissioning test
350-
# Disabled due to flakyness. See:
351-
# https://github.com/project-chip/connectedhomeip/issues/42869
352-
if: false
353355
env:
354356
# Disable TSAN bug reporting, as it reports tons of (hopefully) false positives.
355357
# The reason for that is BlueZ and WPA supplicant integration which involves GIO
@@ -362,13 +364,34 @@ jobs:
362364
--find-path $PWD/scripts \
363365
--runner chip_tool_python \
364366
--target TestOperationalState \
367+
--test-order random \
365368
run \
366369
--iterations 1 \
367370
--test-timeout-seconds 120 \
368371
--tool-path chip-tool:./objdir-clone/linux-x64-chip-tool${CHIP_TOOL_VARIANT}-${BUILD_VARIANT}/chip-tool \
369-
--all-clusters-app ./objdir-clone/linux-x64-all-clusters-no-wifi-openthread-endpoint-${BUILD_VARIANT}/chip-all-clusters-app \
372+
--app-path all-clusters:./objdir-clone/linux-x64-all-clusters-no-wifi-openthread-endpoint-${BUILD_VARIANT}/chip-all-clusters-app \
370373
--commissioning-method ble-thread \
371374
"
375+
rm -rf tmp/
376+
377+
- name: Run Thread-MeshCoP commissioning test
378+
env:
379+
TSAN_OPTIONS: report_bugs=0
380+
run: |
381+
PATH=$PWD/objdir-clone:$PATH ./scripts/run_in_build_env.sh \
382+
"./scripts/tests/run_test_suite.py \
383+
--find-path $PWD/objdir-clone \
384+
--find-path $PWD/scripts \
385+
--runner chip_tool_python \
386+
--target TestOperationalState \
387+
run \
388+
--iterations 1 \
389+
--test-timeout-seconds 120 \
390+
--tool-path chip-tool:./objdir-clone/linux-x64-chip-tool${CHIP_TOOL_VARIANT}-${BUILD_VARIANT}/chip-tool \
391+
--app-path all-clusters:./objdir-clone/linux-x64-all-clusters-no-wifi-no-ble-openthread-endpoint-${BUILD_VARIANT}/chip-all-clusters-app \
392+
--commissioning-method thread-meshcop \
393+
"
394+
rm -rf tmp/
372395
373396
- name: Run Tests using the python parser sending commands to chip-tool
374397
run: |
@@ -377,6 +400,7 @@ jobs:
377400
--find-path $PWD/objdir-clone \
378401
--find-path $PWD/scripts \
379402
--runner chip_tool_python \
403+
--test-order random \
380404
run \
381405
--iterations 1 \
382406
--test-timeout-seconds 120 \
@@ -394,6 +418,7 @@ jobs:
394418
--app-path network-manager:./objdir-clone/linux-x64-network-manager-${BUILD_VARIANT}/matter-network-manager-app \
395419
--app-path energy-gateway:./objdir-clone/linux-x64-energy-gateway-${BUILD_VARIANT}/chip-energy-gateway-app \
396420
--app-path evse:./objdir-clone/linux-x64-evse-${BUILD_VARIANT}/chip-evse-app \
421+
--app-path water-heater:./objdir-clone/linux-x64-water-heater-${BUILD_VARIANT}/matter-water-heater-app \
397422
"
398423
399424
- name: Run purposeful failure tests using the python parser sending commands to chip-tool
@@ -404,6 +429,7 @@ jobs:
404429
--find-path $PWD/scripts \
405430
--runner chip_tool_python \
406431
--include-tags PURPOSEFUL_FAILURE \
432+
--test-order random \
407433
run \
408434
--iterations 1 \
409435
--expected-failures 3 \
@@ -426,6 +452,7 @@ jobs:
426452
--find-path $PWD/scripts \
427453
--runner chip_tool_python \
428454
--target TestOperationalState \
455+
--test-order random \
429456
run \
430457
--iterations 1 \
431458
--test-timeout-seconds 120 \
@@ -448,6 +475,7 @@ jobs:
448475
--exclude-tags EXTRA_SLOW \
449476
--exclude-tags SLOW \
450477
--exclude-tags PURPOSEFUL_FAILURE \
478+
--test-order random \
451479
run \
452480
--iterations 1 \
453481
--test-timeout-seconds 120 \
@@ -464,6 +492,7 @@ jobs:
464492
--app-path network-manager:./objdir-clone/linux-x64-network-manager-${BUILD_VARIANT}/matter-network-manager-app \
465493
--app-path energy-gateway:./objdir-clone/linux-x64-energy-gateway-${BUILD_VARIANT}/chip-energy-gateway-app \
466494
--app-path evse:./objdir-clone/linux-x64-evse-${BUILD_VARIANT}/chip-evse-app \
495+
--app-path water-heater:./objdir-clone/linux-x64-water-heater-${BUILD_VARIANT}/matter-water-heater-app \
467496
"
468497
- name: Run Tests using matter-repl (including slow)
469498
if: github.event_name == 'push'
@@ -473,6 +502,7 @@ jobs:
473502
--find-path $PWD/objdir-clone \
474503
--find-path $PWD/scripts \
475504
--runner matter_repl_python \
505+
--test-order random \
476506
run \
477507
--iterations 1 \
478508
--test-timeout-seconds 120 \
@@ -489,6 +519,7 @@ jobs:
489519
--app-path network-manager:./objdir-clone/linux-x64-network-manager-${BUILD_VARIANT}/matter-network-manager-app \
490520
--app-path energy-gateway:./objdir-clone/linux-x64-energy-gateway-${BUILD_VARIANT}/chip-energy-gateway-app \
491521
--app-path evse:./objdir-clone/linux-x64-evse-${BUILD_VARIANT}/chip-evse-app \
522+
--app-path water-heater:./objdir-clone/linux-x64-water-heater-${BUILD_VARIANT}/matter-water-heater-app \
492523
"
493524
- name: Uploading core files
494525
uses: actions/upload-artifact@v6
@@ -603,6 +634,7 @@ jobs:
603634
--target darwin-${{matrix.arch}}-network-manager-${BUILD_VARIANT} \
604635
--target darwin-${{matrix.arch}}-energy-gateway-${BUILD_VARIANT} \
605636
--target darwin-${{matrix.arch}}-evse-${BUILD_VARIANT} \
637+
--target darwin-${{matrix.arch}}-water-heater-${BUILD_VARIANT} \
606638
--target darwin-${{matrix.arch}}-tv-app-${BUILD_VARIANT} \
607639
--target darwin-${{matrix.arch}}-all-devices-${BUILD_VARIANT} \
608640
--pw-command-launcher=ccache \
@@ -627,6 +659,7 @@ jobs:
627659
--find-path $PWD/scripts \
628660
--runner chip_tool_python \
629661
--target-skip-glob '{Test_TC_DGTHREAD_2_1,Test_TC_DGTHREAD_2_2,Test_TC_DGTHREAD_2_3,Test_TC_DGTHREAD_2_4}' \
662+
--test-order random \
630663
run \
631664
--iterations 1 \
632665
--test-timeout-seconds 120 \
@@ -644,6 +677,7 @@ jobs:
644677
--app-path network-manager:./objdir-clone/darwin-${{matrix.arch}}-network-manager-${BUILD_VARIANT}/matter-network-manager-app \
645678
--app-path energy-gateway:./objdir-clone/darwin-${{matrix.arch}}-energy-gateway-${BUILD_VARIANT}/chip-energy-gateway-app \
646679
--app-path evse:./objdir-clone/darwin-${{matrix.arch}}-evse-${BUILD_VARIANT}/chip-evse-app \
680+
--app-path water-heater:./objdir-clone/darwin-${{matrix.arch}}-water-heater-${BUILD_VARIANT}/matter-water-heater-app \
647681
"
648682
649683
- name: Run purposeful failure tests using the python parser sending commands to chip-tool
@@ -656,6 +690,7 @@ jobs:
656690
--find-path $PWD/scripts \
657691
--runner chip_tool_python \
658692
--include-tags PURPOSEFUL_FAILURE \
693+
--test-order random \
659694
run \
660695
--iterations 1 \
661696
--expected-failures 3 \
@@ -814,6 +849,13 @@ jobs:
814849
--pw-command-launcher=ccache build --copy-artifacts-to objdir-clone
815850
&& rm -rf out/linux-x64-evse-${BUILD_VARIANT}-tsan-clang-test"
816851
852+
- name: Build linux-x64-water-heater
853+
run: >-
854+
./scripts/run_in_build_env.sh "./scripts/build/build_examples.py
855+
--target linux-x64-water-heater-${BUILD_VARIANT}-tsan-clang-test
856+
--pw-command-launcher=ccache build --copy-artifacts-to objdir-clone
857+
&& rm -rf out/linux-x64-water-heater-${BUILD_VARIANT}-tsan-clang-test"
858+
817859
- name: Build linux-x64-network-manager
818860
run: >-
819861
./scripts/run_in_build_env.sh "./scripts/build/build_examples.py
@@ -918,13 +960,6 @@ jobs:
918960
- name: ccache stats
919961
run: ccache -s
920962

921-
- name: Install push_av_server dependencies
922-
run: >-
923-
./scripts/run_in_python_env.sh out/venv \
924-
"python3 -m pip install -r src/tools/push_av_server/requirements.txt \
925-
&& patch -d \$(python3 -m pip show hypercorn | grep 'Location: ' | sed 's/Location: //') -p0 < src/tools/push_av_server/hypercorn.patch \
926-
"
927-
928963
# We archive ourselves since upload-artifact seems to lose permission bits
929964
# We also remove some debug info to make artifacts smaller (otherwise they are 2GB for binaries)
930965
- name: Archive artifacts
@@ -1046,6 +1081,7 @@ jobs:
10461081
echo "SU_OTA_REQUESTOR_V2: objdir-clone/chip-ota-requestor-app_v2.min.ota" >> /tmp/test_env.yaml
10471082
echo "TERMS_AND_CONDITIONS_APP: objdir-clone/linux-x64-terms-and-conditions/chip-terms-and-conditions-app" >> /tmp/test_env.yaml
10481083
echo "TRACE_APP: out/trace_data/app-{SCRIPT_BASE_NAME}" >> /tmp/test_env.yaml
1084+
echo "WATER_HEATER_APP: objdir-clone/linux-x64-water-heater-${BUILD_VARIANT}-tsan-clang-test/matter-water-heater-app" >> /tmp/test_env.yaml
10491085
echo "WATER_LEAK_DETECTOR_APP: objdir-clone/linux-x64-water-leak-detector-${BUILD_VARIANT}-tsan-clang-test-unified/water-leak-detector-app" >> /tmp/test_env.yaml
10501086
# keep-sorted: end
10511087

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,3 +93,6 @@ examples/*/esp32/dependencies.lock
9393

9494
# Initial layout generated by imgui
9595
imgui.ini
96+
97+
# Joint Fabric test harness output file
98+
admin_storage.json

0 commit comments

Comments
 (0)