Skip to content

Commit

Permalink
Merge branch 'master' into memory-report-default-none
Browse files Browse the repository at this point in the history
  • Loading branch information
kpschoedel authored Nov 6, 2023
2 parents d8e6d7c + 99f61c2 commit 00e4000
Show file tree
Hide file tree
Showing 119 changed files with 2,613 additions and 1,701 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@
path = third_party/silabs/wiseconnect-wifi-bt-sdk
url = https://github.com/SiliconLabs/wiseconnect-wifi-bt-sdk.git
branch = 2.8.2
platforms = efr32,silabs_docker
platforms = efr32
[submodule "third_party/silabs/wifi_sdk"]
path = third_party/silabs/wifi_sdk
url = https://github.com/SiliconLabs/wiseconnect.git
Expand Down
24 changes: 19 additions & 5 deletions docs/ci-cd/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,36 @@

### Daily Fail Summary

#### Source

Workflow:
https://github.com/project-chip/connectedhomeip/blob/master/.github/workflows/recent_fail_summary.yaml

Script:
https://github.com/project-chip/connectedhomeip/blob/master/scripts/tools/summarize_fail.py

Fail Definitions:
https://github.com/project-chip/connectedhomeip/blob/master/scripts/tools/build_fail_definitions.yaml

#### Summary

Runs once per day; takes inventory of the previous day's workflow runs and
parses them for fail statistics. Creates temporarily cached artifacts for easy
data parsing. Also saves a daily pass percentage list of all workflows at
https://github.com/project-chip/connectedhomeip/blob/daily_pass_percentage/docs/daily_pass_percentage.md
https://github.com/project-chip/connectedhomeip/blob/daily_pass_percentage/docs/daily_pass_percentage.md.
Fail definitions can be added to the file defined above to allow fast root cause
determination of any fail with an error message.

#### Improvement Ideas

- Keep fail signature list updated to track causes of all common fails
- Make script artifact more known and accessible so it can be easily shared
and used by everyone
- Deliver daily fail summaries in short form through a Slack bot for easy
access

## To Do

- Cert image auto build

## Improvement Ideas

- Deliver daily fail summaries in short form through a Slack bot for easy
access
## General Improvement Ideas
18 changes: 8 additions & 10 deletions examples/platform/silabs/SiWx917/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,9 @@ import("//build_overrides/efr32_sdk.gni")
import("${chip_root}/examples/common/pigweed/pigweed_rpcs.gni")
import("${chip_root}/src/lib/lib.gni")
import("${chip_root}/src/platform/device.gni")
import("${chip_root}/src/platform/silabs/wifi_args.gni")
import("${chip_root}/third_party/silabs/silabs_board.gni")
import("${efr32_sdk_build_root}/SiWx917_sdk.gni")
silabs_common_plat_dir = "${chip_root}/examples/platform/silabs"
wifi_sdk_dir = "${chip_root}/src/platform/silabs/SiWx917/wifi"

declare_args() {
enable_heap_monitoring = false
Expand Down Expand Up @@ -52,13 +51,12 @@ declare_args() {
silabs_test_event_trigger_enable_key = "00112233445566778899aabbccddeeff"
}

import("${chip_root}/src/platform/silabs/wifi_args.gni")
import("${silabs_common_plat_dir}/args.gni")

# Sanity check
assert(chip_enable_wifi)

silabs_common_plat_dir = "${chip_root}/examples/platform/silabs"
silabs_plat_si91x_wifi_dir = "${chip_root}/src/platform/silabs/SiWx917/wifi"
import("${silabs_common_plat_dir}/args.gni")

config("chip_examples_project_config") {
include_dirs = [ "project_include" ]
Expand Down Expand Up @@ -207,7 +205,7 @@ source_set("siwx917-common") {
include_dirs = [
".",
"SiWx917/",
"${wifi_sdk_dir}",
"${silabs_plat_si91x_wifi_dir}",
]

sources = [
Expand All @@ -218,10 +216,10 @@ source_set("siwx917-common") {
"${silabs_common_plat_dir}/heap_4_silabs.c",
"${silabs_common_plat_dir}/silabs_utils.cpp",
"${silabs_common_plat_dir}/syscalls_stubs.cpp",
"${wifi_sdk_dir}/dhcp_client.cpp",
"${wifi_sdk_dir}/ethernetif.cpp",
"${wifi_sdk_dir}/lwip_netif.cpp",
"${wifi_sdk_dir}/wfx_notify.cpp",
"${silabs_plat_si91x_wifi_dir}/dhcp_client.cpp",
"${silabs_plat_si91x_wifi_dir}/ethernetif.cpp",
"${silabs_plat_si91x_wifi_dir}/lwip_netif.cpp",
"${silabs_plat_si91x_wifi_dir}/wfx_notify.cpp",
"SiWx917/sl_wifi_if.c",
"SiWx917/wfx_rsi_host.c",
]
Expand Down
3 changes: 0 additions & 3 deletions examples/platform/silabs/efr32/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,8 @@ if (chip_enable_wifi) {
import("${chip_root}/src/platform/silabs/wifi_args.gni")

if (use_rs9116) {
wiseconnect_sdk_root =
"${chip_root}/third_party/silabs/wiseconnect-wifi-bt-sdk"
import("rs911x/rs911x.gni")
} else if (use_SiWx917) {
wifi_sdk_root = "${chip_root}/third_party/silabs/wifi_sdk"
import("rs911x/rs9117.gni")
}
if (use_wf200) {
Expand Down
8 changes: 3 additions & 5 deletions examples/platform/silabs/efr32/rs911x/rs9117.gni
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
import("//build_overrides/chip.gni")

examples_plat_dir = "${chip_root}/examples/platform/silabs/efr32"
wifi_sdk_dir = "${chip_root}/src/platform/silabs/efr32/wifi"
wifi_sdk_root = "${chip_root}/third_party/silabs/wifi_sdk"
import("//build_overrides/efr32_sdk.gni")
import("${efr32_sdk_build_root}/efr32_sdk.gni")

rs911x_src_plat = [
"${examples_plat_dir}/rs911x/sl_wifi_if.c",
"${examples_plat_dir}/rs911x/wfx_rsi_host.c",
"${examples_plat_dir}/rs911x/hal/rsi_hal_mcu_interrupt.c",
"${examples_plat_dir}/rs911x/hal/efx_spi.c",
"${wifi_sdk_dir}/wfx_notify.cpp",
"${silabs_plat_efr32_wifi_dir}/wfx_notify.cpp",
]

rs911x_inc_plat = [
Expand Down
8 changes: 3 additions & 5 deletions examples/platform/silabs/efr32/rs911x/rs911x.gni
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import("//build_overrides/chip.gni")

examples_plat_dir = "${chip_root}/examples/platform/silabs/efr32"
wifi_sdk_dir = "${chip_root}/src/platform/silabs/efr32/wifi"
wiseconnect_sdk_root = "${chip_root}/third_party/silabs/wiseconnect-wifi-bt-sdk"
import("//build_overrides/efr32_sdk.gni")
import("${efr32_sdk_build_root}/efr32_sdk.gni")

rs911x_src_plat = [
"${examples_plat_dir}/rs911x/rsi_if.c",
Expand All @@ -11,7 +9,7 @@ rs911x_src_plat = [
"${examples_plat_dir}/rs911x/hal/rsi_hal_mcu_ioports.c",
"${examples_plat_dir}/rs911x/hal/rsi_hal_mcu_timer.c",
"${examples_plat_dir}/rs911x/hal/efx_spi.c",
"${wifi_sdk_dir}/wfx_notify.cpp",
"${silabs_plat_efr32_wifi_dir}/wfx_notify.cpp",
]

#
Expand Down
7 changes: 3 additions & 4 deletions examples/platform/silabs/efr32/wf200/wf200.gni
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import("//build_overrides/chip.gni")

examples_plat_dir = "${chip_root}/examples/platform/silabs/efr32"
wifi_sdk_dir = "${chip_root}/src/platform/silabs/efr32/wifi"
import("//build_overrides/efr32_sdk.gni")
import("${efr32_sdk_build_root}/efr32_sdk.gni")

wf200_plat_incs = [ "${examples_plat_dir}/wf200" ]
wf200_plat_src = [
"${wifi_sdk_dir}/wfx_notify.cpp",
"${silabs_plat_efr32_wifi_dir}/wfx_notify.cpp",
"${examples_plat_dir}/wf200/sl_wfx_task.c",
"${examples_plat_dir}/wf200/wf200_init.c",
"${examples_plat_dir}/wf200/efr_spi.c",
Expand Down
2 changes: 1 addition & 1 deletion integrations/cloudbuild/smoke-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ steps:
- PW_ENVIRONMENT_ROOT=/pwenv
args:
- "-c"
- source ./scripts/bootstrap.sh
- source ./scripts/bootstrap.sh -p all,nrfconnect
id: Bootstrap
waitFor:
- Submodules
Expand Down
1 change: 1 addition & 0 deletions kotlin-detect-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ style:
- "**/src/controller/java/tests/matter/tlv/TlvReaderTest.kt"
- "**/src/controller/java/tests/matter/tlv/TlvReadWriteTest.kt"
- "**/src/controller/java/tests/matter/tlv/TlvWriterTest.kt"
- "**/src/controller/java/generated/java/**/*"
WildcardImport:
excludes:
- "**/examples/android/CHIPTest/app/src/androidTest/java/com/tcl/chip/chiptest/ExampleInstrumentedTest.kt"
Expand Down
6 changes: 6 additions & 0 deletions scripts/build/builders/efr32.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,14 @@ def __init__(self,
# case for pre-installed images), use it directly.
sdk_path = shlex.quote(os.environ['GSDK_ROOT'])
self.extra_gn_options.append(f"efr32_sdk_root=\"{sdk_path}\"")

if "GSDK_ROOT" in os.environ and not enable_wifi:
self.extra_gn_options.append(f"openthread_root=\"{sdk_path}/util/third_party/openthread\"")

if "WISECONNECT_SDK_ROOT" in os.environ and enable_rs911x:
wiseconnect_sdk_path = shlex.quote(os.environ['WISECONNECT_SDK_ROOT'])
self.extra_gn_options.append(f"wiseconnect_sdk_root=\"{wiseconnect_sdk_path}\"")

def GnBuildArgs(self):
return self.extra_gn_options

Expand Down
2 changes: 2 additions & 0 deletions scripts/examples/gn_silabs_example.sh
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,8 @@ else
;;
--docker)
optArgs+="efr32_sdk_root=\"$GSDK_ROOT\" "
optArgs+="wiseconnect_sdk_root=\"$WISECONNECT_SDK_ROOT\" "
optArgs+="wifi_sdk_root=\"$WIFI_SDK_ROOT\" "
USE_DOCKER=true
shift
;;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,10 @@

package matter.devicecontroller.cluster.clusters

import matter.controller.MatterController
import matter.devicecontroller.cluster.structs.*
{% set typeLookup = idl | createLookupContext(cluster) %}
class {{cluster.name}}Cluster(private val endpointId: UShort) {
class {{cluster.name}}Cluster(private val controller: MatterController, private val endpointId: UShort) {

{%- set already_handled_command = [] -%}
{%- for command in cluster.commands | sort(attribute='code') -%}
Expand Down Expand Up @@ -101,19 +102,32 @@ class {{cluster.name}}Cluster(private val endpointId: UShort) {
{{field.name | lowfirst_except_acronym}}: {{encode_value(cluster, field | asEncodable(typeLookup), 0)}}
{%- if not loop.last -%}, {% endif %}
{%- endfor -%}
{%- if command.is_timed_invoke -%}
, timedInvokeTimeoutMs: Int)
{%- else -%}
, timedInvokeTimeoutMs: Int? = null)
{%- endif -%}
{%- else -%}
{%- if command.is_timed_invoke -%}
timedInvokeTimeoutMs: Int)
{%- else -%}
timedInvokeTimeoutMs: Int? = null)
{%- endif -%}
{%- endif -%}
{%- if command | hasResponse -%}
: {{callbackName}} {
{%- else %} {
{%- endif %}
{%- endif %}
val commandId = {{command.code}}L
{% if command.is_timed_invoke %}
// Implementation needs to be added here
{%- else %}
if (timedInvokeTimeoutMs != null) {
// Do the action with timedInvokeTimeoutMs
} else {
// Do the action without timedInvokeTimeoutMs
}
}
{%- endif %}
}
{% endfor -%}

Expand All @@ -132,19 +146,24 @@ class {{cluster.name}}Cluster(private val endpointId: UShort) {
{% endif -%}
{%- if attribute.is_writable %}
{%- set encodable = attribute.definition | asEncodable(typeLookup) -%}
{%- set encodable2 = attribute.definition | asEncodable(typeLookup) -%}
{%- if not attribute.requires_timed_write %}
suspend fun write{{ attribute.definition.name | upfirst }}Attribute(
value: {{ encode_value_without_optional_nullable(cluster, encodable, 0) }}
) {
// Implementation needs to be added here
}
{% endif %}
{%- set encodable2 = attribute.definition | asEncodable(typeLookup) %}
suspend fun write{{ attribute.definition.name | upfirst }}Attribute(
value: {{ encode_value_without_optional_nullable(cluster, encodable2, 0) }},
{%- if attribute.requires_timed_write -%}
timedWriteTimeoutMs: Int
{%- else %}
timedWriteTimeoutMs: Int? = null
{%- endif %}
) {
{%- if attribute.requires_timed_write %}
// Implementation needs to be added here
{%- else %}
if (timedWriteTimeoutMs != null) {
// Do the action with timedWriteTimeoutMs
} else {
// Do the action without timedWriteTimeoutMs
}
{%- endif %}
}
{% endif %}
{%- if attribute.is_subscribable %}
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion scripts/tools/summarize_fail.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

yesterday = (datetime.datetime.now() - datetime.timedelta(days=1)).strftime('%Y-%m-%d')

with open("scripts/tools/build_fail_defs.yaml", "r") as fail_defs:
with open("scripts/tools/build_fail_definitions.yaml", "r") as fail_defs:
try:
error_catalog = yaml.safe_load(fail_defs)
except Exception:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,13 @@

package matter.devicecontroller.cluster.clusters

import matter.controller.MatterController
import matter.devicecontroller.cluster.structs.*

class AccessControlCluster(private val endpointId: UShort) {
class AccessControlCluster(
private val controller: MatterController,
private val endpointId: UShort
) {
class AclAttribute(val value: List<AccessControlClusterAccessControlEntryStruct>)

class ExtensionAttribute(val value: List<AccessControlClusterAccessControlExtensionStruct>?)
Expand All @@ -40,15 +44,15 @@ class AccessControlCluster(private val endpointId: UShort) {
// Implementation needs to be added here
}

suspend fun writeAclAttribute(value: List<AccessControlClusterAccessControlEntryStruct>) {
// Implementation needs to be added here
}

suspend fun writeAclAttribute(
value: List<AccessControlClusterAccessControlEntryStruct>,
timedWriteTimeoutMs: Int
timedWriteTimeoutMs: Int? = null
) {
// Implementation needs to be added here
if (timedWriteTimeoutMs != null) {
// Do the action with timedWriteTimeoutMs
} else {
// Do the action without timedWriteTimeoutMs
}
}

suspend fun subscribeAclAttribute(minInterval: Int, maxInterval: Int): AclAttribute {
Expand All @@ -65,17 +69,15 @@ class AccessControlCluster(private val endpointId: UShort) {
// Implementation needs to be added here
}

suspend fun writeExtensionAttribute(
value: List<AccessControlClusterAccessControlExtensionStruct>
) {
// Implementation needs to be added here
}

suspend fun writeExtensionAttribute(
value: List<AccessControlClusterAccessControlExtensionStruct>,
timedWriteTimeoutMs: Int
timedWriteTimeoutMs: Int? = null
) {
// Implementation needs to be added here
if (timedWriteTimeoutMs != null) {
// Do the action with timedWriteTimeoutMs
} else {
// Do the action without timedWriteTimeoutMs
}
}

suspend fun subscribeExtensionAttribute(minInterval: Int, maxInterval: Int): ExtensionAttribute {
Expand Down
Loading

0 comments on commit 00e4000

Please sign in to comment.