Skip to content

Commit

Permalink
Merge branch 'master' into flake8-fix-esp32
Browse files Browse the repository at this point in the history
  • Loading branch information
andy31415 authored Feb 28, 2023
2 parents df87cb8 + faa1c2b commit c77c13e
Show file tree
Hide file tree
Showing 424 changed files with 24,157 additions and 28,468 deletions.
38 changes: 0 additions & 38 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ exclude = third_party
src/test_driver/openiotsdk/*
src/test_driver/mbed/*
src/test_driver/linux-cirque/*
src/test_driver/efr32/*
build/chip/java/tests/*
build/chip/linux/*
build/config/linux/*
Expand All @@ -22,29 +21,24 @@ exclude = third_party
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
examples/platform/nxp/k32w/k32w0/scripts/detokenizer.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/efr32.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/build/test.py
scripts/codegen.py
scripts/codepregen.py
scripts/error_table.py
scripts/examples/gn_to_cmakelists.py
scripts/examples/tests/test.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/gen_test_driver.py
scripts/helpers/bloat_check.py
scripts/pregenerate/using_codegen.py
scripts/pregenerate/using_zap.py
Expand All @@ -61,36 +55,22 @@ exclude = third_party
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/__init__.py
scripts/tests/chiptest/runner.py
scripts/tests/chiptest/test_definition.py
scripts/tests/chiptest/yamltest_with_chip_repl_tester.py
scripts/tests/java/base.py
scripts/tests/java/commissioning_test.py
scripts/tests/java/discover_test.py
scripts/tests/run_java_test.py
scripts/tests/run_python_test.py
scripts/tests/run_test_suite.py
scripts/tools/check_zcl_file_sync.py
scripts/tools/convert_ini.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/nxp/factory_data_generator/custom.py
scripts/tools/nxp/factory_data_generator/default.py
scripts/tools/nxp/factory_data_generator/generate.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/test_generate.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/tests/suites/certification/information.py
src/app/zap_cluster_list.py
src/controller/python/build-chip-wheel.py
src/controller/python/chip-device-ctrl.py
Expand All @@ -106,10 +86,8 @@ exclude = third_party
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/CHIPClusters.py
src/controller/python/chip/clusters/ClusterObjects.py
src/controller/python/chip/clusters/Command.py
src/controller/python/chip/clusters/Objects.py
src/controller/python/chip/clusters/__init__.py
src/controller/python/chip/discovery/__init__.py
src/controller/python/chip/interaction_model/__init__.py
Expand All @@ -122,23 +100,7 @@ exclude = third_party
src/controller/python/chip/yaml/__init__.py
src/controller/python/chip/yaml/format_converter.py
src/controller/python/chip/yaml/runner.py
src/controller/python/test/test_scripts/base.py
src/controller/python/test/test_scripts/cluster_objects.py
src/controller/python/test/test_scripts/mobile-device-test.py
src/controller/python/test/test_scripts/network_commissioning.py
src/controller/python/test/unit_tests/test_cluster_objects.py
src/controller/python/test/unit_tests/test_tlv.py
src/lib/asn1/gen_asn1oid.py
src/pybindings/pycontroller/build-chip-wheel.py
src/pybindings/pycontroller/pychip/__init__.py
src/python_testing/TC_ACE_1_3.py
src/python_testing/TC_ACE_1_4.py
src/python_testing/TC_CGEN_2_4.py
src/python_testing/TC_DA_1_7.py
src/python_testing/TC_RR_1_1.py
src/python_testing/TC_SC_3_6.py
src/python_testing/TC_TestEventTrigger.py
src/python_testing/hello_test.py
src/python_testing/matter_testing_support.py
src/setup_payload/python/generate_setup_payload.py
src/setup_payload/tests/run_python_setup_payload_gen_test.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
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/[email protected]
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
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
7 changes: 7 additions & 0 deletions build/config/compiler/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,13 @@ config("stack_protector_default") {
cflags = [ "-fno-stack-protector" ]
}

config("prefix_mappings_default") {
cflags = []
foreach(prefix_mapping, prefix_mappings) {
cflags += [ "-fdebug-prefix-map=${prefix_mapping}" ]
}
}

config("pic_default") {
if (enable_pic) {
cflags = [ "-fPIC" ]
Expand Down
3 changes: 3 additions & 0 deletions build/config/compiler/compiler.gni
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,7 @@ declare_args() {

# Enable address sanitizer
is_asan = false

# Debug prefix mapping (values for -fdebug-prefix-map=).
prefix_mappings = []
}
Loading

0 comments on commit c77c13e

Please sign in to comment.