Skip to content

Commit

Permalink
Merge branch 'master' into chef-nrf-contact-sensor-battery-324031858
Browse files Browse the repository at this point in the history
  • Loading branch information
stingchang authored Apr 10, 2024
2 parents c499d0e + f92178b commit 73829b6
Show file tree
Hide file tree
Showing 71 changed files with 712 additions and 1,478 deletions.
52 changes: 38 additions & 14 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ on:
workflow_dispatch:

concurrency:
group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }}
group:
${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name ==
'pull_request' && github.event.number) || (github.event_name ==
'workflow_dispatch' && github.run_number) || github.sha }}
cancel-in-progress: true

jobs:
Expand All @@ -43,7 +46,7 @@ jobs:
- name: Checkout submodules & Bootstrap
uses: ./.github/actions/checkout-submodules-and-bootstrap
with:
platform: linux
platform: linux

- name: Check for orphaned gn files
if: always()
Expand Down Expand Up @@ -103,7 +106,6 @@ jobs:
--known-failure app/reporting/reporting.cpp \
--known-failure app/reporting/tests/MockReportScheduler.cpp \
--known-failure app/reporting/tests/MockReportScheduler.h \
--known-failure app/TestEventTriggerDelegate.h \
--known-failure app/util/attribute-storage.cpp \
--known-failure app/util/attribute-storage.h \
--known-failure app/util/attribute-storage-detail.h \
Expand Down Expand Up @@ -174,23 +176,28 @@ jobs:
# git grep exits with 0 if it finds a match, but we want
# to fail (exit nonzero) on match. And we want to exclude this file,
# to avoid our grep regexp matching itself.
- name: Check for use of PRI*8, which are not supported on some libcs.
- name:
Check for use of PRI*8, which are not supported on some libcs.
if: always()
run: |
git grep -I -n "PRI.8" -- './*' ':(exclude).github/workflows/lint.yml' ':(exclude)third_party/lwip/repo/lwip/src/include/lwip/arch.h' && exit 1 || exit 0
# git grep exits with 0 if it finds a match, but we want
# to fail (exit nonzero) on match. And we want to exclude this file,
# to avoid our grep regexp matching itself.
- name: Check for use of PRI*16, which are not supported on some libcs.
- name:
Check for use of PRI*16, which are not supported on some
libcs.
if: always()
run: |
git grep -I -n "PRI.16" -- './*' ':(exclude).github/workflows/lint.yml' ':(exclude)third_party/lwip/repo/lwip/src/include/lwip/arch.h' && exit 1 || exit 0
# git grep exits with 0 if it finds a match, but we want
# to fail (exit nonzero) on match. And we want to exclude this file,
# to avoid our grep regexp matching itself.
- name: Check for use of PRI*64, which are not supported on some libcs.
- name:
Check for use of PRI*64, which are not supported on some
libcs.
if: always()
run: |
# TODO: MessageDefHelper should ideally not be excluded here.
Expand Down Expand Up @@ -230,22 +237,28 @@ jobs:
# git grep exits with 0 if it finds a match, but we want
# to fail (exit nonzero) on match. And we want to exclude this file,
# to avoid our grep regexp matching itself.
- name: Check for use of 0x%u and the like, which lead to misleading output.
- name:
Check for use of 0x%u and the like, which lead to misleading
output.
if: always()
run: |
git grep -I -n '0x%[0-9l.-]*[^0-9lxX".-]' -- './*' ':(exclude).github/workflows/lint.yml' && exit 1 || exit 0
# git grep exits with 0 if it finds a match, but we want
# to fail (exit nonzero) on match. And we want to exclude this file,
# to avoid our grep regexp matching itself.
- name: Check for use of '"0x" PRIu*' and the like, which lead to misleading output.
- name:
Check for use of '"0x" PRIu*' and the like, which lead to
misleading output.
if: always()
run: |
git grep -I -n '0x%[0-9-]*" *PRI[^xX]' -- './*' ':(exclude).github/workflows/lint.yml' && exit 1 || exit 0
# git grep exits with 0 if it finds a match, but we want
# to fail (exit nonzero) on match.
- name: Check for use of NSLog instead of Matter logging in Matter framework
- name:
Check for use of NSLog instead of Matter logging in Matter
framework
if: always()
run: |
git grep -n 'NSLog(' -- src/darwin/Framework/CHIP && exit 1 || exit 0
Expand All @@ -254,7 +267,9 @@ jobs:
# to fail (exit nonzero) on match. And we want to exclude this file,
# to avoid our grep regexp matching itself, as well as excluding the files
# that implement the type-safe accessors
- name: Check for use of 'emberAfReadAttribute' instead of the type-safe getters
- name:
Check for use of 'emberAfReadAttribute' instead of the
type-safe getters
if: always()
run: |
git grep -I -n 'emberAfReadAttribute' -- './*' ':(exclude).github/workflows/lint.yml' ':(exclude)src/app/util/attribute-table.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' && exit 1 || exit 0
Expand All @@ -264,7 +279,9 @@ jobs:
# to avoid our grep regexp matching itself, as well as excluding the files
# that implement the type-safe accessors, attribute writing from the wire, and some
# Pigweed RPC code that seems hard to update.
- name: Check for use of 'emberAfWriteAttribute' instead of the type-safe setters
- name:
Check for use of 'emberAfWriteAttribute' instead of the
type-safe setters
if: always()
run: |
git grep -I -n 'emberAfWriteAttribute' -- './*' ':(exclude).github/workflows/lint.yml' ':(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
Expand All @@ -278,22 +295,29 @@ jobs:
# git grep exits with 0 if it finds a match, but we want
# to fail (exit nonzero) on match. And we want to exclude this file,
# to avoid our grep regexp matching itself.
- name: Check for use of "SuccessOrExit(CHIP_ERROR_*)", which should probably be "SuccessOrExit(err = CHIP_ERROR_*)"
- name:
Check for use of "SuccessOrExit(CHIP_ERROR_*)", which should
probably be "SuccessOrExit(err = CHIP_ERROR_*)"
if: always()
run: |
git grep -I -n 'SuccessOrExit(CHIP_ERROR' -- './*' ':(exclude).github/workflows/lint.yml' && exit 1 || exit 0
# git grep exits with 0 if it finds a match, but we want
# to fail (exit nonzero) on match. And we want to exclude this file,
# to avoid our grep regexp matching itself.
- name: Check for use of "SuccessOrExit(something-without-assignment(", which should probably be "SuccessOrExit(err = something("
- name:
Check for use of
"SuccessOrExit(something-without-assignment(", which should
probably be "SuccessOrExit(err = something("
if: always()
run: |
git grep -I -n 'SuccessOrExit([^=)]*(' -- './*' ':(exclude).github/workflows/lint.yml' && exit 1 || exit 0
# git grep exits with 0 if it finds a match, but we want
# to fail (exit nonzero) on match.
- name: Check for use of "using namespace" outside of a class/function in headers.
- name:
Check for use of "using namespace" outside of a class/function
in headers.
if: always()
run: |
# Various platforms have `using namespace chip::Ble` in their BLEManager* headers; just exclude those for now.
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,7 @@ jobs:
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_FAN_3_4.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --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 --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_FAN_3_5.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --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 --app out/linux-x64-lit-icd-ipv6only-no-ble-no-wifi-tsan-clang-test/lit-icd-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_ICDM_2_1.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --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 --app out/linux-x64-lit-icd-ipv6only-no-ble-no-wifi-tsan-clang-test/lit-icd-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json --enable-key 000102030405060708090a0b0c0d0e0f" --script "src/python_testing/TC_ICDManagementCluster.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --hex-arg enableKey:000102030405060708090a0b0c0d0e0f --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 --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_IDM_1_2.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --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 --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json --enable-key 000102030405060708090a0b0c0d0e0f" --script "src/python_testing/TC_IDM_1_4.py" --script-args "--hex-arg PIXIT.DGGEN.TEST_EVENT_TRIGGER_KEY:000102030405060708090a0b0c0d0e0f --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --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 --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_PWRTL_2_1.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
Expand Down
2 changes: 1 addition & 1 deletion examples/chip-tool/commands/common/DeviceScanner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ CHIP_ERROR DeviceScanner::Stop()

void DeviceScanner::OnNodeDiscovered(const DiscoveredNodeData & nodeData)
{
auto & commissionData = nodeData.commissionData;
auto & commissionData = nodeData.nodeData;

auto discriminator = commissionData.longDiscriminator;
auto vendorId = static_cast<VendorId>(commissionData.vendorId);
Expand Down
4 changes: 2 additions & 2 deletions examples/chip-tool/commands/common/DeviceScanner.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ struct DeviceScannerResult
chip::Optional<chip::Dnssd::CommonResolutionData> mResolutionData;
};

class DeviceScanner : public chip::Dnssd::CommissioningResolveDelegate,
class DeviceScanner : public chip::Dnssd::DiscoverNodeDelegate,
public chip::Dnssd::DnssdBrowseDelegate
#if CONFIG_NETWORK_LAYER_BLE
,
Expand All @@ -56,7 +56,7 @@ class DeviceScanner : public chip::Dnssd::CommissioningResolveDelegate,
CHIP_ERROR Get(uint16_t index, chip::Dnssd::CommonResolutionData & resolutionData);
void Log() const;

/////////// CommissioningResolveDelegate Interface /////////
/////////// DiscoverNodeDelegate Interface /////////
void OnNodeDiscovered(const chip::Dnssd::DiscoveredNodeData & nodeData) override;

/////////// DnssdBrowseDelegate Interface /////////
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ CHIP_ERROR LogDiscoveredNodeData(const chip::Dnssd::DiscoveredNodeData & nodeDat
VerifyOrReturnError(gDelegate != nullptr, CHIP_NO_ERROR);

auto & resolutionData = nodeData.resolutionData;
auto & commissionData = nodeData.commissionData;
auto & commissionData = nodeData.nodeData;

if (!chip::CanCastTo<uint8_t>(resolutionData.numIPs))
{
Expand Down
2 changes: 1 addition & 1 deletion examples/chip-tool/commands/pairing/PairingCommand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ void PairingCommand::OnICDStayActiveComplete(NodeId deviceId, uint32_t promisedA
void PairingCommand::OnDiscoveredDevice(const chip::Dnssd::DiscoveredNodeData & nodeData)
{
// Ignore nodes with closed commissioning window
VerifyOrReturn(nodeData.commissionData.commissioningMode != 0);
VerifyOrReturn(nodeData.nodeData.commissioningMode != 0);

auto & resolutionData = nodeData.resolutionData;

Expand Down
1 change: 1 addition & 0 deletions examples/lighting-app/nxp/k32w/k32w0/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ k32w0_executable("light_app") {
"${chip_root}/examples/common/QRCode",
"${chip_root}/examples/lighting-app/nxp/zap/",
"${chip_root}/examples/providers:device_info_provider",
"${chip_root}/src/app:test-event-trigger",
"${chip_root}/src/lib",
"${chip_root}/src/platform:syscalls_stub",
"${chip_root}/third_party/mbedtls:mbedtls",
Expand Down
3 changes: 3 additions & 0 deletions examples/lighting-app/silabs/build_for_wifi_args.gni
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ silabs_sdk_target = get_label_info(":sdk", "label_no_toolchain")
chip_enable_openthread = false
import("${chip_root}/src/platform/silabs/wifi_args.gni")

# Not needed for the Lighting-app
chip_enable_read_client = false

chip_enable_ota_requestor = true
app_data_model =
"${chip_root}/examples/lighting-app/silabs/data_model:silabs-lighting"
Loading

0 comments on commit 73829b6

Please sign in to comment.