Skip to content

Commit

Permalink
Merge pull request #1 from SiliconLabsSoftware/bugfix/sdk_update
Browse files Browse the repository at this point in the history
Merging CSA Pointer to develop
  • Loading branch information
mykrupp authored Sep 10, 2024
2 parents a8c0523 + b3c540d commit c281529
Show file tree
Hide file tree
Showing 1,275 changed files with 91,432 additions and 39,553 deletions.
38 changes: 22 additions & 16 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,19 @@ ARG USER_UID=1000
ARG USER_GID=$USER_UID
ENV LANG en_US.utf8

# these are installed for terminal/dev convenience. If more tooling for build is required, please
# add them to chip-build (in integrations/docker/images/chip-build)

# These are installed for terminal/dev convenience. If more tooling for build is required, please
# add them to chip-build (in integrations/docker/images/chip-build).
RUN apt-get update \
&& apt-get install -y locales \
&& localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 \
&& apt-get -fy install git vim emacs sudo \
&& apt-get -fy install vim emacs sudo \
apt-utils dialog zsh \
iproute2 procps lsb-release \
lsb-release \
bash-completion \
build-essential cmake cppcheck valgrind \
wget curl telnet \
valgrind \
docker.io \
iputils-ping net-tools \
libncurses5 \
libncursesw5 \
libpython2.7 \
iputils-ping \
&& :

RUN groupadd -g $USER_GID $USERNAME \
Expand All @@ -55,13 +52,22 @@ RUN curl https://raw.githubusercontent.com/restyled-io/restyler/master/bin/resty
RUN mkdir -p /opt/sdk/sdks/ \
&& chown -R $USERNAME:$USERNAME \
/opt/sdk/sdks/ `# NXP uses a patch_sdk script to change SDK files` \
/opt/NordicSemiconductor/nrfconnect/ `# $USERNAME needs to own west configuration to build nRF Connect examples` \
$IDF_PATH `# $USERNAME needs to own the esp-idf and tools for the examples to build` \
$ANDROID_HOME \
$IDF_TOOLS_PATH \
&& find $AMEBA_PATH -name "inc_lp" -print0 | xargs -0 chown -R $USERNAME:$USERNAME \
&& find $AMEBA_PATH -name "inc_hp" -print0 | xargs -0 chown -R $USERNAME:$USERNAME \
&& find $AMEBA_PATH -name "project_lp" -print0 | xargs -0 chown -R $USERNAME:$USERNAME \
&& find $AMEBA_PATH -name "project_hp" -print0 | xargs -0 chown -R $USERNAME:$USERNAME \
&& chmod -R +x \
$ANDROID_HOME/tools/bin `# sdkmanager for accepting licenses`\
&& chmod -R +w \
$IDF_TOOLS_PATH \
$SYSROOT_AARCH64 `# allow read/write access to header and libraries` \
$ANDROID_HOME `# allow licenses to be accepted` \
$AMEBA_PATH `# AmebaD requires access to change build_info.h` \
$IMX_SDK_ROOT \
&& find $AMEBA_PATH -name "inc_lp" -print0 | xargs -0 chmod -R +w \
&& find $AMEBA_PATH -name "inc_hp" -print0 | xargs -0 chmod -R +w \
&& find $AMEBA_PATH -name "project_lp" -print0 | xargs -0 chmod -R +w \
&& find $AMEBA_PATH -name "project_hp" -print0 | xargs -0 chmod -R +w \
# Safe directory is preffered over chown.
&& git config --global --add safe.directory "*" \
&& :

# Fix Tizen SDK paths for new user
Expand Down
5 changes: 4 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,12 @@
"mounts": [
"source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind"
],
"initializeCommand": "bash .devcontainer/build.sh --tag matter-dev-environment:local --version 22",
"initializeCommand": "bash .devcontainer/build.sh --tag matter-dev-environment:local --version 74",
"image": "matter-dev-environment:local",
"remoteUser": "vscode",
"containerEnv": {
"PW_ENVIRONMENT_ROOT": "${containerWorkspaceFolder}/.environment-vscode"
},
"customizations": {
"vscode": {
// Add the IDs of extensions you want installed when the container is created in the array below.
Expand Down
10 changes: 8 additions & 2 deletions .github/.wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ AdvSendAdvert
AE
aef
AES
AFL
AIDL
algs
alloc
Expand Down Expand Up @@ -340,6 +341,7 @@ datamodel
DataModelRevision
dataset
datasets
datastore
DataVersion
dbf
DBG
Expand Down Expand Up @@ -454,6 +456,7 @@ DS
duplicative
DUT
DUTS
DUT's
DV
DVK
dynload
Expand Down Expand Up @@ -562,12 +565,14 @@ forkpty
FOTA
FreeRTOS
FreeRTOSConfig
FS
fsl
fstab
fsync
ftd
fullclean
fuzzer
fuzztest
FW
gbl
gcloud
Expand Down Expand Up @@ -854,6 +859,7 @@ MbedNewTarget
mbedos
mbedTarget
mbedTLS
MCORE
mcu
MCUboot
mcumgr
Expand Down Expand Up @@ -945,8 +951,6 @@ NitricOxideConcentrationMeasurement
NitrogenDioxideConcentrationMeasurement
nl
nltest
NLUnitTest
NLUnitTests
nmcli
nmtui
noc
Expand Down Expand Up @@ -1005,6 +1009,7 @@ optionOverride
optionsMask
optionsOverride
orgs
OSS
OTA
OTADownloader
otaDownloadPath
Expand Down Expand Up @@ -1527,6 +1532,7 @@ virtualenv
visualstudio
vlatest
VLEDs
vm
vn
vnc
vous
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ jobs:
with:
languages: "cpp"
- name: Setup Build
run: scripts/build/gn_gen.sh --args="chip_config_memory_debug_checks=true chip_config_memory_debug_dmalloc=false"
run: scripts/build/gn_gen.sh --args="chip_config_memory_debug_checks=true chip_config_memory_debug_dmalloc=false chip_data_model_check_die_on_failure=true"
- name: Run Build
run: scripts/run_in_build_env.sh "ninja -C ./out"
- name: Run Tests
Expand Down Expand Up @@ -179,7 +179,7 @@ jobs:
scripts/run_in_build_env.sh "ninja -C ./out/$BUILD_TYPE"
- name: Setup Build, Run Build and Run Tests
run: |
BUILD_TYPE=gcc_release scripts/build/gn_gen.sh --args="is_debug=false"
BUILD_TYPE=gcc_release scripts/build/gn_gen.sh --args="is_debug=false chip_data_model_check_die_on_failure=true"
scripts/run_in_build_env.sh "ninja -C ./out/gcc_release"
BUILD_TYPE=gcc_release scripts/tests/gn_tests.sh
- name: Clean output
Expand All @@ -197,7 +197,7 @@ jobs:
esac
rm -rf ./out/sanitizers
BUILD_TYPE=sanitizers scripts/build/gn_gen.sh --args="$GN_ARGS" --export-compile-commands
BUILD_TYPE=sanitizers scripts/build/gn_gen.sh --args="$GN_ARGS chip_data_model_check_die_on_failure=true" --export-compile-commands
BUILD_TYPE=sanitizers scripts/tests/gn_tests.sh
done
- name: Ensure codegen is done for sanitize
Expand Down Expand Up @@ -308,7 +308,7 @@ jobs:

- name: Setup Build, Run Build and Run Tests
run: |
scripts/build/gn_gen.sh --args="enable_rtti=true chip_config_memory_debug_checks=false chip_config_memory_debug_dmalloc=false chip_generate_link_map_file=false"
scripts/build/gn_gen.sh --args="enable_rtti=true chip_config_memory_debug_checks=false chip_config_memory_debug_dmalloc=false chip_generate_link_map_file=false chip_data_model_check_die_on_failure=true"
scripts/run_in_build_env.sh "ninja -C ./out"
scripts/tests/gn_tests.sh
- name: Setup test python environment
Expand Down Expand Up @@ -415,7 +415,7 @@ jobs:
# clang.
"default") GN_ARGS='target_os="all" is_asan=true enable_host_clang_build=false';;
esac
BUILD_TYPE=$BUILD_TYPE scripts/build/gn_gen.sh --args="$GN_ARGS" --export-compile-commands
BUILD_TYPE=$BUILD_TYPE scripts/build/gn_gen.sh --args="$GN_ARGS chip_data_model_check_die_on_failure=true" --export-compile-commands
scripts/run_in_build_env.sh "ninja -C ./out/$BUILD_TYPE"
BUILD_TYPE=$BUILD_TYPE scripts/tests/gn_tests.sh
done
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/darwin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ jobs:
mkdir -p /tmp/darwin/framework-tests
echo "This is a simple log" > /tmp/darwin/framework-tests/end_user_support_log.txt
../../../out/debug/all-clusters-app/chip-all-clusters-app --interface-id -1 --end_user_support_log /tmp/darwin/framework-tests/end_user_support_log.txt > >(tee /tmp/darwin/framework-tests/all-cluster-app.log) 2> >(tee /tmp/darwin/framework-tests/all-cluster-app-err.log >&2) &
../../../out/debug/all-clusters-app/chip-all-clusters-app --interface-id -1 --dac_provider ../../../credentials/development/commissioner_dut/struct_cd_origin_pid_vid_correct/test_case_vector.json --product-id 32768 --discriminator 3839 --secured-device-port 5539 --KVS /tmp/chip-all-clusters-app-kvs2 > >(tee /tmp/darwin/framework-tests/all-cluster-app-origin-vid.log) 2> >(tee /tmp/darwin/framework-tests/all-cluster-app-origin-vid-err.log >&2) &
export TEST_RUNNER_ASAN_OPTIONS=__CURRENT_VALUE__:detect_stack_use_after_return=1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/examples-nxp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'

container:
image: ghcr.io/project-chip/chip-build-rw61x:74
image: ghcr.io/project-chip/chip-build-nxp:74
volumes:
- "/tmp/bloat_reports:/tmp/bloat_reports"
steps:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,8 @@ jobs:
if [ "$idl_file" = './examples/placeholder/linux/apps/app2/config.matter' ]; then continue; fi
if [ "$idl_file" = './examples/thermostat/thermostat-common/thermostat.matter' ]; then continue; fi
if [ "$idl_file" = './examples/window-app/common/window-app.matter' ]; then continue; fi
# Example is intentionally not spe compliant for use in cert testing
if [ "$idl_file" = './examples/lighting-app-data-mode-no-unique-id/lighting-common/lighting-app.matter' ]; then continue; fi
# Test files are intentionally small and not spec-compilant, just parse-compliant
if [ "$idl_file" = "./scripts/py_matter_idl/matter_idl/tests/inputs/cluster_struct_attribute.matter" ]; then continue; fi
Expand Down
27 changes: 22 additions & 5 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -475,29 +475,43 @@ jobs:
mkdir objdir-clone || true
- name: Build Python REPL and example apps
# NOTE: the data-mode-check + check-failure-die is not 100% perfect as different
# encoding sizes for data that keeps changing may alter over time (e.g. anything relating to time
# or resources such as packet counts or other similar counters)
#
# This may result in invalid errors, however for most purposes of our testing, we are unlikely to
# hit such cases so we remain very strict on testing here.
run: |
scripts/run_in_build_env.sh './scripts/build_python.sh --install_virtual_env out/venv'
./scripts/run_in_build_env.sh \
"./scripts/build/build_examples.py \
--target linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test \
--target linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test-data-model-check-check-failure-die \
--target linux-x64-lock-ipv6only-no-ble-no-wifi-tsan-clang-test \
--target linux-x64-lit-icd-ipv6only-no-ble-no-wifi-tsan-clang-test \
--target linux-x64-energy-management-ipv6only-no-ble-no-wifi-tsan-clang-test \
--target linux-x64-microwave-oven-ipv6only-no-ble-no-wifi-tsan-clang-test \
--target linux-x64-rvc-ipv6only-no-ble-no-wifi-tsan-clang-test \
--target linux-x64-network-manager-ipv6only-no-ble-no-wifi-tsan-clang-test \
--target linux-x64-fabric-admin-rpc-ipv6only-clang \
--target linux-x64-fabric-bridge-rpc-ipv6only-no-ble-no-wifi-clang \
--target linux-x64-light-data-model-no-unique-id-ipv6only-no-ble-no-wifi-clang \
--target linux-x64-python-bindings \
build \
--copy-artifacts-to objdir-clone \
"
- name: Generate an argument environment file
run: |
echo -n "" >/tmp/test_env.yaml
echo "ALL_CLUSTERS_APP: out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app" >> /tmp/test_env.yaml
echo "ALL_CLUSTERS_APP: out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test-data-model-check-check-failure-die/chip-all-clusters-app" >> /tmp/test_env.yaml
echo "CHIP_LOCK_APP: out/linux-x64-lock-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-lock-app" >> /tmp/test_env.yaml
echo "ENERGY_MANAGEMENT_APP: out/linux-x64-energy-management-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-energy-management-app" >> /tmp/test_env.yaml
echo "LIT_ICD_APP: out/linux-x64-lit-icd-ipv6only-no-ble-no-wifi-tsan-clang-test/lit-icd-app" >> /tmp/test_env.yaml
echo "CHIP_MICROWAVE_OVEN_APP: out/linux-x64-microwave-oven-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-microwave-oven-app" >> /tmp/test_env.yaml
echo "CHIP_RVC_APP: out/linux-x64-rvc-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-rvc-app" >> /tmp/test_env.yaml
echo "NETWORK_MANAGEMENT_APP: out/linux-x64-network-manager-ipv6only-no-ble-no-wifi-tsan-clang-test/matter-network-manager-app" >> /tmp/test_env.yaml
echo "FABRIC_ADMIN_APP: out/linux-x64-fabric-admin-rpc-ipv6only-clang/fabric-admin" >> /tmp/test_env.yaml
echo "FABRIC_BRIDGE_APP: out/linux-x64-fabric-bridge-rpc-ipv6only-no-ble-no-wifi-clang/fabric-bridge-app" >> /tmp/test_env.yaml
echo "LIGHTING_APP_NO_UNIQUE_ID: out/linux-x64-light-data-model-no-unique-id-ipv6only-no-ble-no-wifi-clang/chip-lighting-app" >> /tmp/test_env.yaml
echo "TRACE_APP: out/trace_data/app-{SCRIPT_BASE_NAME}" >> /tmp/test_env.yaml
echo "TRACE_TEST_JSON: out/trace_data/test-{SCRIPT_BASE_NAME}" >> /tmp/test_env.yaml
echo "TRACE_TEST_PERFETTO: out/trace_data/test-{SCRIPT_BASE_NAME}" >> /tmp/test_env.yaml
Expand All @@ -507,17 +521,20 @@ jobs:
mkdir -p out/trace_data
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'
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'
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --script "src/python_testing/TestMatterTestingSupport.py" --script-args "--trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --script "src/python_testing/TestSpecParsingSupport.py" --script-args "--trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
scripts/run_in_python_env.sh out/venv './scripts/tests/TestTimeSyncTrustedTimeSourceRunner.py'
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-data-model-check-check-failure-die/chip-all-clusters-app'
scripts/run_in_python_env.sh out/venv './src/python_testing/test_testing/test_TC_ICDM_2_1.py'
scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/TestIdChecks.py'
scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/TestSpecParsingDeviceType.py'
scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/TestSpecParsingSupport.py'
scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/TestConformanceTest.py'
scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/TestConformanceSupport.py'
scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/TestConformanceTest.py'
scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/TestChoiceConformanceSupport.py'
scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/test_testing/test_IDM_10_4.py'
scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/test_testing/test_TC_SC_7_1.py'
scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/test_testing/TestDecorators.py'
scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/TestMatterTestingSupport.py'
scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/TestSpecParsingSupport.py'
- name: Uploading core files
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unit_integration_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:
*) ;;
esac
scripts/build/gn_gen.sh --args="$GN_ARGS"
scripts/build/gn_gen.sh --args="$GN_ARGS chip_data_model_check_die_on_failure=true"
- name: Run Build
run: scripts/run_in_build_env.sh "ninja -C out/$BUILD_TYPE"
- name: Run Tests
Expand Down
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ out/
/src/darwin/Framework/build/

# Pigweed Environment
.environment/
.environment*/
build_overrides/pigweed_environment.gni

# Temporary Directories
Expand Down Expand Up @@ -84,4 +84,3 @@ examples/*/esp32/dependencies.lock

# jupyter temporary files
.ipynb_checkpoints

16 changes: 16 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -329,3 +329,19 @@
path = third_party/infineon/psoc6/psoc6_sdk/libs/lwip-network-interface-integration
url = https://github.com/Infineon/lwip-network-interface-integration.git
platforms = infineon
[submodule "third_party/abseil-cpp/src"]
path = third_party/abseil-cpp/src
url = https://github.com/abseil/abseil-cpp.git
platforms = linux,darwin
[submodule "third_party/fuzztest"]
path = third_party/fuzztest
url = https://github.com/google/fuzztest.git
platforms = linux,darwin
[submodule "third_party/googletest"]
path = third_party/googletest
url = https://github.com/google/googletest
platforms = linux,darwin
[submodule "third_party/re2/src"]
path = third_party/re2/src
url = https://github.com/google/re2.git
platforms = linux,darwin
4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"files.associations": {
".gitmodules": "ini",
"*.mm": "cpp",
"iostream": "cpp",
"array": "cpp",
Expand Down Expand Up @@ -138,6 +139,9 @@
"list": "cpp",
"unordered_set": "cpp"
},
"[ini]": {
"editor.formatOnSave": false
},
// Configure paths or glob patterns to exclude from file watching.
"files.watcherExclude": {
"**/.git/objects/**": true,
Expand Down
17 changes: 17 additions & 0 deletions BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") {
if (enable_fuzz_test_targets) {
group("fuzz_tests") {
deps = [
"${chip_root}/examples/all-clusters-app/linux:fuzz-chip-all-clusters-app",
"${chip_root}/src/credentials/tests:fuzz-chip-cert",
"${chip_root}/src/lib/core/tests:fuzz-tlv-reader",
"${chip_root}/src/lib/dnssd/minimal_mdns/tests:fuzz-minmdns-packet-parsing",
Expand All @@ -62,6 +63,18 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") {
}
}

if (pw_enable_fuzz_test_targets) {
group("pw_fuzz_tests") {
deps = [
"${chip_root}/src/credentials/tests:fuzz-chip-cert-pw(//build/toolchain/pw_fuzzer:chip_pw_fuzztest)",
"${chip_root}/src/lib/core/tests:fuzz-tlv-reader-pw(//build/toolchain/pw_fuzzer:chip_pw_fuzztest)",
"${chip_root}/src/lib/dnssd/minimal_mdns/tests:fuzz-minmdns-packet-parsing-pw(//build/toolchain/pw_fuzzer:chip_pw_fuzztest)",
"${chip_root}/src/lib/format/tests:fuzz-payload-decoder-pw(//build/toolchain/pw_fuzzer:chip_pw_fuzztest)",
"${chip_root}/src/setup_payload/tests:fuzz-setup-payload-base38-pw(//build/toolchain/pw_fuzzer:chip_pw_fuzztest)",
]
}
}

# Matter's in-tree pw_python_package or pw_python_distribution targets.
_matter_python_packages = [
"//examples/chef",
Expand Down Expand Up @@ -140,6 +153,10 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") {
deps += [ "//:fuzz_tests" ]
}

if (pw_enable_fuzz_test_targets) {
deps += [ "//:pw_fuzz_tests" ]
}

if (chip_device_platform != "none") {
deps += [ "${chip_root}/src/app/server" ]
}
Expand Down
Loading

0 comments on commit c281529

Please sign in to comment.