Skip to content

Commit

Permalink
Merge branch 'master' into repl/python-commissioner
Browse files Browse the repository at this point in the history
  • Loading branch information
yunhanw-google authored Feb 28, 2023
2 parents ebba2b0 + c5f023b commit 4911d6e
Show file tree
Hide file tree
Showing 602 changed files with 37,915 additions and 37,258 deletions.
105 changes: 105 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -1,2 +1,107 @@
[flake8]
max-line-length = 132
exclude = third_party
.*
out/*
scripts/idl/*
./examples/common/QRCode/*
# temporarily scan only directories with fixed files
# TODO: Remove the paths below when all bugs are fixed
src/tools/chip-cert/*
src/test_driver/openiotsdk/*
src/test_driver/mbed/*
src/test_driver/linux-cirque/*
src/test_driver/esp32/*
build/chip/java/tests/*
build/chip/linux/*
build/config/linux/*
credentials/fetch-paa-certs-from-dcl.py
docs/_extensions/external_content.py
examples/common/pigweed/rpc_console/py/chip_rpc/console.py
examples/lighting-app/python/lighting.py
examples/platform/mbed/ota/generate_ota_list_image.py
scripts/build/build/target.py
scripts/build/build/targets.py
scripts/build/builders/android.py
scripts/build/builders/bouffalolab.py
scripts/build/builders/cc13x2x7_26x2x7.py
scripts/build/builders/esp32.py
scripts/build/builders/genio.py
scripts/build/builders/gn.py
scripts/build/builders/imx.py
scripts/build/builders/infineon.py
scripts/build/builders/nrf.py
scripts/codegen.py
scripts/codepregen.py
scripts/error_table.py
scripts/examples/gn_to_cmakelists.py
scripts/flashing/bouffalolab_firmware_utils.py
scripts/flashing/cyw30739_firmware_utils.py
scripts/flashing/nrfconnect_firmware_utils.py
scripts/gen_chip_version.py
scripts/helpers/bloat_check.py
scripts/pregenerate/using_codegen.py
scripts/pregenerate/using_zap.py
scripts/py_matter_yamltests/matter_yamltests/constraints.py
scripts/py_matter_yamltests/matter_yamltests/definitions.py
scripts/py_matter_yamltests/matter_yamltests/fixes.py
scripts/py_matter_yamltests/matter_yamltests/parser.py
scripts/py_matter_yamltests/matter_yamltests/pics_checker.py
scripts/py_matter_yamltests/matter_yamltests/pseudo_clusters/pseudo_clusters.py
scripts/py_matter_yamltests/matter_yamltests/yaml_loader.py
scripts/py_matter_yamltests/test_pics_checker.py
scripts/py_matter_yamltests/test_spec_definitions.py
scripts/py_matter_yamltests/test_yaml_loader.py
scripts/py_matter_yamltests/test_yaml_parser.py
scripts/run-clang-tidy-on-compile-commands.py
scripts/setup/nrfconnect/update_ncs.py
scripts/tests/chiptest/yamltest_with_chip_repl_tester.py
scripts/tools/check_zcl_file_sync.py
scripts/tools/convert_ini.py
scripts/tools/generate_esp32_chip_factory_bin.py
scripts/tools/memory/memdf/__init__.py
scripts/tools/memory/report_summary.py
scripts/tools/nrfconnect/generate_nrfconnect_chip_factory_data.py
scripts/tools/nrfconnect/nrfconnect_generate_partition.py
scripts/tools/nrfconnect/tests/test_generate_factory_data.py
scripts/tools/silabs/FactoryDataProvider.py
scripts/tools/telink/mfg_tool.py
scripts/tools/zap/generate.py
scripts/tools/zap/prune_outputs.py
scripts/tools/zap/version_update.py
scripts/tools/zap/zap_download.py
scripts/tools/zap_convert_all.py
src/app/ota_image_tool.py
src/app/zap_cluster_list.py
src/controller/python/build-chip-wheel.py
src/controller/python/chip-device-ctrl.py
src/controller/python/chip/CertificateAuthority.py
src/controller/python/chip/ChipBleUtility.py
src/controller/python/chip/ChipBluezMgr.py
src/controller/python/chip/ChipCommissionableNodeCtrl.py
src/controller/python/chip/ChipCoreBluetoothMgr.py
src/controller/python/chip/ChipDeviceCtrl.py
src/controller/python/chip/ChipReplStartup.py
src/controller/python/chip/ChipStack.py
src/controller/python/chip/ChipUtility.py
src/controller/python/chip/FabricAdmin.py
src/controller/python/chip/ble/scan_devices.py
src/controller/python/chip/clusters/Attribute.py
src/controller/python/chip/clusters/ClusterObjects.py
src/controller/python/chip/clusters/Command.py
src/controller/python/chip/clusters/__init__.py
src/controller/python/chip/discovery/__init__.py
src/controller/python/chip/interaction_model/__init__.py
src/controller/python/chip/interaction_model/delegate.py
src/controller/python/chip/internal/commissioner.py
src/controller/python/chip/setup_payload/setup_payload.py
src/controller/python/chip/storage/__init__.py
src/controller/python/chip/tlv/__init__.py
src/controller/python/chip/utils/CommissioningBuildingBlocks.py
src/controller/python/chip/yaml/__init__.py
src/controller/python/chip/yaml/format_converter.py
src/controller/python/chip/yaml/runner.py
src/lib/asn1/gen_asn1oid.py
src/pybindings/pycontroller/build-chip-wheel.py
src/pybindings/pycontroller/pychip/__init__.py
src/setup_payload/python/generate_setup_payload.py
36 changes: 36 additions & 0 deletions .github/workflows/examples-telink.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,15 @@ jobs:
out/telink-tlsr9518adk80d-light/zephyr/zephyr.elf \
/tmp/bloat_reports/
- name: Build example Telink Lighting App with RPC
run: |
./scripts/run_in_build_env.sh \
"./scripts/build/build_examples.py --target 'telink-tlsr9518adk80d-light-rpc' build"
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
telink tlsr9518adk80d lighting-app-rpc \
out/telink-tlsr9518adk80d-light/zephyr/zephyr.elf \
/tmp/bloat_reports/
- name: Build example Telink Light Switch App
run: |
./scripts/run_in_build_env.sh \
Expand All @@ -115,6 +124,15 @@ jobs:
out/telink-tlsr9518adk80d-light-switch/zephyr/zephyr.elf \
/tmp/bloat_reports/
- name: Build example Telink Lock App
run: |
./scripts/run_in_build_env.sh \
"./scripts/build/build_examples.py --target 'telink-tlsr9518adk80d-lock' build"
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
telink tlsr9518adk80d lock-app \
out/telink-tlsr9518adk80d-lock/zephyr/zephyr.elf \
/tmp/bloat_reports/
- name: Build example Telink OTA Requestor App
run: |
./scripts/run_in_build_env.sh \
Expand All @@ -124,6 +142,24 @@ jobs:
out/telink-tlsr9518adk80d-ota-requestor/zephyr/zephyr.elf \
/tmp/bloat_reports/
- name: Build example Telink Pump App
run: |
./scripts/run_in_build_env.sh \
"./scripts/build/build_examples.py --target 'telink-tlsr9518adk80d-pump' build"
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
telink tlsr9518adk80d pump-app \
out/telink-tlsr9518adk80d-pump/zephyr/zephyr.elf \
/tmp/bloat_reports/
- name: Build example Telink Pump Controller App
run: |
./scripts/run_in_build_env.sh \
"./scripts/build/build_examples.py --target 'telink-tlsr9518adk80d-pump-controller' build"
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
telink tlsr9518adk80d pump-controller-app \
out/telink-tlsr9518adk80d-pump-controller/zephyr/zephyr.elf \
/tmp/bloat_reports/
- name: Build example Telink Thermostat App
run: |
./scripts/run_in_build_env.sh \
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -214,3 +214,10 @@ jobs:
if: always()
run: |
git grep -n 'emberAfWriteAttribute' -- './*' ':(exclude).github/workflows/lint.yml' ':(exclude)src/app/util/af.h' ':(exclude)zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp' ':(exclude)src/app/zap-templates/templates/app/attributes/Accessors-src.zapt' ':(exclude)src/app/util/attribute-table.cpp' ':(exclude)examples/common/pigweed/rpc_services/Attributes.h' ':(exclude)src/app/util/attribute-table.h' ':(exclude)src/app/util/ember-compatibility-functions.cpp' && exit 1 || exit 0
# Run python Linter (flake8) and verify python files
# ignore some style errors, restyler should do that
- name: Check for errors using flake8 Python linter
if: always()
run: |
flake8 --extend-ignore=E501,W391
46 changes: 45 additions & 1 deletion .github/workflows/qemu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ env:
CHIP_NO_LOG_TIMESTAMPS: true

jobs:
qemu:

qemu-esp32:
name: ESP32
timeout-minutes: 85

Expand Down Expand Up @@ -94,3 +95,46 @@ jobs:
with:
name: qemu-esp32-logs
path: /tmp/log_output

qemu-tizen:
name: Tizen

runs-on: ubuntu-latest
if: github.actor != 'restyled-io[bot]'

container:
image: connectedhomeip/chip-build-tizen-qemu:0.6.39
volumes:
- "/tmp/log_output:/tmp/test_logs"

steps:
- uses: Wandalen/wretry.action@v1.0.36
name: Checkout
with:
action: actions/checkout@v3
with: |
token: ${{ github.token }}
attempt_limit: 3
attempt_delay: 2000
- name: Checkout submodules
run: scripts/checkout_submodules.py --shallow --platform tizen

- name: Bootstrap cache
uses: actions/cache@v3
timeout-minutes: 10
with:
key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }}
path: |
.environment
build_overrides/pigweed_environment.gni
- name: Bootstrap
timeout-minutes: 25
run: scripts/build/gn_bootstrap.sh

- name: Build and run tests
run: |
./scripts/run_in_build_env.sh \
"./scripts/build/build_examples.py \
--target tizen-arm-tests-no-ble \
build
"
47 changes: 43 additions & 4 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ env:
jobs:
test_suites_linux:
name: Test Suites - Linux
timeout-minutes: 145
timeout-minutes: 180

strategy:
matrix:
Expand Down Expand Up @@ -226,13 +226,32 @@ jobs:
--tv-app ./out/linux-x64-tv-app-${BUILD_VARIANT}/chip-tv-app \
--bridge-app ./out/linux-x64-bridge-${BUILD_VARIANT}/chip-bridge-app \
"
- name: Run Tests using the python parser sending commands to chip-tool
timeout-minutes: 65
run: |
./scripts/run_in_build_env.sh \
"./scripts/tests/run_test_suite.py \
--runner chip_tool_python \
--chip-tool ./out/linux-x64-chip-tool${CHIP_TOOL_VARIANT}-${BUILD_VARIANT}/chip-tool \
run \
--iterations 1 \
--test-timeout-seconds 120 \
--all-clusters-app ./out/linux-x64-all-clusters-${BUILD_VARIANT}/chip-all-clusters-app \
--lock-app ./out/linux-x64-lock-${BUILD_VARIANT}/chip-lock-app \
--ota-provider-app ./out/linux-x64-ota-provider-${BUILD_VARIANT}/chip-ota-provider-app \
--ota-requestor-app ./out/linux-x64-ota-requestor-${BUILD_VARIANT}/chip-ota-requestor-app \
--tv-app ./out/linux-x64-tv-app-${BUILD_VARIANT}/chip-tv-app \
--bridge-app ./out/linux-x64-bridge-${BUILD_VARIANT}/chip-bridge-app \
"
- name: Run Tests using chip-repl (skip slow)
timeout-minutes: 45
if: github.event_name == 'pull_request'
run: |
./scripts/run_in_build_env.sh \
"./scripts/tests/run_test_suite.py \
--run-yamltests-with-chip-repl \
--runner chip_repl_python \
--exclude-tags MANUAL \
--exclude-tags FLAKY \
--exclude-tags IN_DEVELOPMENT \
Expand All @@ -253,7 +272,7 @@ jobs:
run: |
./scripts/run_in_build_env.sh \
"./scripts/tests/run_test_suite.py \
--run-yamltests-with-chip-repl \
--runner chip_repl_python \
run \
--iterations 1 \
--test-timeout-seconds 120 \
Expand Down Expand Up @@ -283,7 +302,7 @@ jobs:

test_suites_darwin:
name: Test Suites - Darwin
timeout-minutes: 150
timeout-minutes: 180

strategy:
matrix:
Expand Down Expand Up @@ -372,6 +391,26 @@ jobs:
--tv-app ./out/darwin-x64-tv-app-${BUILD_VARIANT}/chip-tv-app \
--bridge-app ./out/darwin-x64-bridge-${BUILD_VARIANT}/chip-bridge-app \
"
- name: Run Tests using the python parser sending commands to chip-tool
timeout-minutes: 80
run: |
./scripts/run_in_build_env.sh \
"./scripts/tests/run_test_suite.py \
--runner chip_tool_python \
--chip-tool ./out/darwin-x64-chip-tool${CHIP_TOOL_VARIANT}-${BUILD_VARIANT}/chip-tool \
--target-skip-glob '{Test_TC_DGTHREAD_2_1,Test_TC_DGTHREAD_2_2,Test_TC_DGTHREAD_2_3,Test_TC_DGTHREAD_2_4}' \
run \
--iterations 1 \
--test-timeout-seconds 120 \
--all-clusters-app ./out/darwin-x64-all-clusters-${BUILD_VARIANT}/chip-all-clusters-app \
--lock-app ./out/darwin-x64-lock-${BUILD_VARIANT}/chip-lock-app \
--ota-provider-app ./out/darwin-x64-ota-provider-${BUILD_VARIANT}/chip-ota-provider-app \
--ota-requestor-app ./out/darwin-x64-ota-requestor-${BUILD_VARIANT}/chip-ota-requestor-app \
--tv-app ./out/darwin-x64-tv-app-${BUILD_VARIANT}/chip-tv-app \
--bridge-app ./out/darwin-x64-bridge-${BUILD_VARIANT}/chip-bridge-app \
"
- name: Uploading core files
uses: actions/upload-artifact@v3
if: ${{ failure() && !env.ACT }}
Expand Down
3 changes: 3 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,10 @@
"telink-tlsr9518adk80d-contact-sensor",
"telink-tlsr9518adk80d-light",
"telink-tlsr9518adk80d-light-switch",
"telink-tlsr9518adk80d-lock-app",
"telink-tlsr9518adk80d-ota-requestor",
"telink-tlsr9518adk80d-pump-app",
"telink-tlsr9518adk80d-pump-controller-app",
"telink-tlsr9518adk80d-thermostat",
"tizen-arm-light"
]
Expand Down
12 changes: 11 additions & 1 deletion BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -668,12 +668,21 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") {

if (enable_tizen_lighting_app) {
group("tizen_lighting_app") {
deps = [ "${chip_root}/examples/lighting-app/tizen/(${chip_root}/build/toolchain/tizen:tizen_arm)" ]
deps = [ "${chip_root}/examples/lighting-app/tizen(${chip_root}/build/toolchain/tizen:tizen_arm)" ]
}

extra_build_deps += [ ":tizen_lighting_app" ]
}

if (enable_tizen_builds) {
group("check:tizen") {
testonly = true
deps = [ "${chip_root}/src/test_driver/tizen/integration-tests:check" ]
}

extra_check_deps += [ ":check:tizen" ]
}

if (enable_mw320_shell_build) {
group("mw320_shell") {
deps = [ "${chip_root}/examples/shell/mw320(${chip_root}/config/mw320/toolchain:mw320_shell)" ]
Expand Down Expand Up @@ -703,6 +712,7 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") {
}

group("check") {
testonly = true
deps = extra_check_deps
foreach(_build, builds) {
deps += [ get_label_info(_build, "dir") + ":check_" +
Expand Down
14 changes: 10 additions & 4 deletions build/chip/java/config.gni
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,16 @@ declare_args() {
java_matter_controller_dependent_paths = []
build_java_matter_controller = false
if (java_path != "") {
java_matter_controller_dependent_paths += [
"${java_path}/include/",
"${java_path}/include/linux/",
]
java_matter_controller_dependent_paths += [ "${java_path}/include/" ]

if (current_os == "mac") {
java_matter_controller_dependent_paths +=
[ "${java_path}/include/darwin/" ]
} else {
java_matter_controller_dependent_paths +=
[ "${java_path}/include/linux/" ]
}

build_java_matter_controller = true
}
}
1 change: 0 additions & 1 deletion build/chip/java/tests/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

import json
import os
import subprocess
import unittest
from os import path

Expand Down
Loading

0 comments on commit 4911d6e

Please sign in to comment.