Skip to content

Commit

Permalink
Merge branch 'master' into bl706_ethernet_support
Browse files Browse the repository at this point in the history
  • Loading branch information
woody-apple authored Jul 18, 2023
2 parents 6a53531 + ac3535b commit a2f543b
Show file tree
Hide file tree
Showing 91 changed files with 2,650 additions and 463 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/chef.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ jobs:
uses: ./.github/actions/checkout-submodules-and-bootstrap
with:
platform: esp32
- name: Fixup GdbGui requirement
run: perl -i -pe 's/^gdbgui==/# gdbgui==/' /opt/espressif/esp-idf/requirements.txt
- name: CI Examples ESP32
shell: bash
run: |
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/examples-esp32.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ jobs:
with:
platform: esp32

- name: Fixup GdbGui requirement
run: perl -i -pe 's/^gdbgui==/# gdbgui==/' /opt/espressif/esp-idf/requirements.txt

- name: Set up environment for size reports
uses: ./.github/actions/setup-size-reports
if: ${{ !env.ACT }}
Expand Down Expand Up @@ -139,6 +142,9 @@ jobs:
with:
platform: esp32

- name: Fixup GdbGui requirement
run: perl -i -pe 's/^gdbgui==/# gdbgui==/' /opt/espressif/esp-idf/requirements.txt

- name: Build example Bridge App
run: scripts/examples/esp_example.sh bridge-app

Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/qemu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ jobs:
with:
platform: esp32

- name: Fixup GdbGui requirement
run: perl -i -pe 's/^gdbgui==/# gdbgui==/' /opt/espressif/esp-idf/requirements.txt

- name: Build ESP32 QEMU test images
run: |
scripts/run_in_build_env.sh " \
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,9 @@ 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_decode 1" --script "src/python_testing/TC_ACE_1_3.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021"'
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_decode 1" --script "src/python_testing/TC_CGEN_2_4.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021"'
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_decode 1" --script "src/python_testing/TC_DA_1_2.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"'
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_decode 1" --script "src/python_testing/TC_TIMESYNC_3_1.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021"'
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_decode 1" --script "src/python_testing/TC_DA_1_5.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"'
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_decode 1" --script "src/python_testing/TestCommissioningTimeSync.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021"'
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_decode 1" --script "src/python_testing/TC_IDM_1_2.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021"'
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --script "src/python_testing/TestMatterTestingSupport.py"'
- name: Uploading core files
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2692,7 +2692,7 @@ server cluster OperationalState = 96 {
readonly attribute nullable int8u currentPhase = 1;
readonly attribute nullable elapsed_s countdownTime = 2;
readonly attribute OperationalStateStruct operationalStateList[] = 3;
readonly attribute OperationalStateStruct operationalState = 4;
readonly attribute OperationalStateEnum operationalState = 4;
readonly attribute ErrorStateStruct operationalError = 5;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,10 @@ class OperationalStateDelegate : public Delegate

public:
/**
* Get current operational state.
* @param op The GenericOperationalState to fill with the current operational state value.
* @return void.
* Get the current operational state.
* @return The current operational state value
*/
void GetCurrentOperationalState(GenericOperationalState & op) override;
uint8_t GetCurrentOperationalState() override;

/**
* Get the list of supported operational states.
Expand Down Expand Up @@ -86,7 +85,7 @@ class OperationalStateDelegate : public Delegate
* Set current operational state.
* @param opState The operational state that should now be the current one.
*/
CHIP_ERROR SetOperationalState(const GenericOperationalState & opState) override;
CHIP_ERROR SetOperationalState(uint8_t opState) override;

/**
* Set operational phase.
Expand Down Expand Up @@ -125,7 +124,7 @@ class OperationalStateDelegate : public Delegate
*/
void HandleStopStateCallback(GenericOperationalError & err) override;

OperationalStateDelegate(GenericOperationalState aOperationalState, GenericOperationalError aOperationalError,
OperationalStateDelegate(uint8_t aOperationalState, GenericOperationalError aOperationalError,
Span<const GenericOperationalState> aOperationalStateList,
Span<const GenericOperationalPhase> aOperationalPhaseList,
app::DataModel::Nullable<uint8_t> aPhase = DataModel::Nullable<uint8_t>(),
Expand All @@ -137,7 +136,7 @@ class OperationalStateDelegate : public Delegate
~OperationalStateDelegate() = default;

private:
GenericOperationalState mOperationalState;
uint8_t mOperationalState;
GenericOperationalError mOperationalError;
app::DataModel::List<const GenericOperationalState> mOperationalStateList;
Span<const GenericOperationalPhase> mOperationalPhaseList;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ namespace OperationalState {

using chip::Protocols::InteractionModel::Status;

CHIP_ERROR OperationalStateDelegate::SetOperationalState(const GenericOperationalState & opState)
CHIP_ERROR OperationalStateDelegate::SetOperationalState(uint8_t opState)
{
mOperationalState = opState;
return CHIP_NO_ERROR;
Expand All @@ -42,9 +42,9 @@ CHIP_ERROR OperationalStateDelegate::SetCountdownTime(const app::DataModel::Null
return CHIP_NO_ERROR;
}

void OperationalStateDelegate::GetCurrentOperationalState(GenericOperationalState & op)
uint8_t OperationalStateDelegate::GetCurrentOperationalState()
{
op = mOperationalState;
return mOperationalState;
}

CHIP_ERROR OperationalStateDelegate::SetOperationalError(const GenericOperationalError & opErrState)
Expand Down Expand Up @@ -91,28 +91,28 @@ CHIP_ERROR OperationalStateDelegate::GetOperationalPhaseAtIndex(size_t index, Ge
void OperationalStateDelegate::HandlePauseStateCallback(GenericOperationalError & err)
{
// placeholder implementation
mOperationalState.Set(to_underlying(OperationalStateEnum::kPaused));
mOperationalState = to_underlying(OperationalStateEnum::kPaused);
err.Set(to_underlying(ErrorStateEnum::kNoError));
}

void OperationalStateDelegate::HandleResumeStateCallback(GenericOperationalError & err)
{
// placeholder implementation
mOperationalState.Set(to_underlying(OperationalStateEnum::kRunning));
mOperationalState = to_underlying(OperationalStateEnum::kRunning);
err.Set(to_underlying(ErrorStateEnum::kNoError));
}

void OperationalStateDelegate::HandleStartStateCallback(GenericOperationalError & err)
{
// placeholder implementation
mOperationalState.Set(to_underlying(OperationalStateEnum::kRunning));
mOperationalState = to_underlying(OperationalStateEnum::kRunning);
err.Set(to_underlying(ErrorStateEnum::kNoError));
}

void OperationalStateDelegate::HandleStopStateCallback(GenericOperationalError & err)
{
// placeholder implementation
mOperationalState.Set(to_underlying(OperationalStateEnum::kStopped));
mOperationalState = to_underlying(OperationalStateEnum::kStopped);
err.Set(to_underlying(ErrorStateEnum::kNoError));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ static const GenericOperationalPhase opPhaseList[] = {
* Operational State Delegate
* Note: User Define
*/
static OperationalStateDelegate opStateDelegate(GenericOperationalState(to_underlying(OperationalStateEnum::kStopped)),
static OperationalStateDelegate opStateDelegate(to_underlying(OperationalStateEnum::kStopped),
GenericOperationalError(to_underlying(ErrorStateEnum::kNoError)),
Span<const GenericOperationalState>(opStateList),
Span<const GenericOperationalPhase>(opPhaseList));
Expand Down
1 change: 1 addition & 0 deletions examples/all-clusters-app/esp32/main/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ set(SRC_DIRS_LIST
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/lock"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/mode-support"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/server"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/icd"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/util"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/reporting"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/administrator-commissioning-server"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ set(SRC_DIRS_LIST
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/shell_extension"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/providers"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/server"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/icd"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/util"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/reporting"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/administrator-commissioning-server"
Expand Down
5 changes: 5 additions & 0 deletions examples/chip-tool/commands/pairing/PairingCommand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,11 @@ CommissioningParameters PairingCommand::GetCommissioningParameters()
break;
}

if (mCountryCode.HasValue())
{
params.SetCountryCode(CharSpan::fromCharString(mCountryCode.Value()));
}

return params;
}

Expand Down
7 changes: 7 additions & 0 deletions examples/chip-tool/commands/pairing/PairingCommand.h
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,12 @@ class PairingCommand : public CHIPCommand,
break;
}

if (mode != PairingMode::None)
{
AddArgument("country-code", &mCountryCode,
"Country code to use to set the Basic Information cluster's Location attribute");
}

AddArgument("timeout", 0, UINT16_MAX, &mTimeout);
}

Expand Down Expand Up @@ -203,6 +209,7 @@ class PairingCommand : public CHIPCommand,
chip::Optional<bool> mSkipCommissioningComplete;
chip::Optional<bool> mBypassAttestationVerifier;
chip::Optional<std::vector<uint32_t>> mCASEAuthTags;
chip::Optional<char *> mCountryCode;
uint16_t mRemotePort;
uint16_t mDiscriminator;
uint32_t mSetupPINCode;
Expand Down
4 changes: 4 additions & 0 deletions examples/platform/linux/CommissionerMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ class PairingCommand : public Controller::DevicePairingDelegate
void OnCommissioningStatusUpdate(PeerId peerId, CommissioningStage stageCompleted, CHIP_ERROR error) override;

void OnReadCommissioningInfo(const ReadCommissioningInfo & info) override;
void OnFabricCheck(const MatchingFabricInfo & info) override;

private:
#if CHIP_DEVICE_CONFIG_APP_PLATFORM_ENABLED
Expand Down Expand Up @@ -344,7 +345,10 @@ void PairingCommand::OnReadCommissioningInfo(const ReadCommissioningInfo & info)
{
ChipLogProgress(AppServer, "OnReadCommissioningInfo - vendorId=0x%04X productId=0x%04X", info.basic.vendorId,
info.basic.productId);
}

void PairingCommand::OnFabricCheck(const MatchingFabricInfo & info)
{
if (info.nodeId != kUndefinedNodeId)
{
ChipLogProgress(AppServer, "ALREADY ON FABRIC WITH nodeId=0x" ChipLogFormatX64, ChipLogValueX64(info.nodeId));
Expand Down
4 changes: 4 additions & 0 deletions examples/platform/silabs/efr32/uart.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ extern "C" {
#include "assert.h"
#include "em_core.h"
#include "em_usart.h"
#ifdef SL_BOARD_NAME
#include "sl_board_control.h"
#endif
#include "sl_uartdrv_instances.h"
#ifdef SL_CATALOG_UARTDRV_EUSART_PRESENT
#include "sl_uartdrv_eusart_vcom_config.h"
Expand Down Expand Up @@ -252,7 +254,9 @@ void uartConsoleInit(void)
return;
}

#ifdef SL_BOARD_NAME
sl_board_enable_vcom();
#endif
// Init a fifo for the data received on the uart
InitFifo(&sReceiveFifo, sRxFifoBuffer, MAX_BUFFER_SIZE);

Expand Down
6 changes: 3 additions & 3 deletions integrations/cloudbuild/build-all.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ steps:
- "--init"
- "--recursive"
id: Submodules
- name: "connectedhomeip/chip-build-vscode:0.7.25"
- name: "ghcr.io/project-chip/chip-build-vscode:1"
env:
- PW_ENVIRONMENT_ROOT=/pwenv
args:
Expand All @@ -21,7 +21,7 @@ steps:
path: /pwenv
timeout: 900s

- name: "connectedhomeip/chip-build-vscode:0.7.25"
- name: "ghcr.io/project-chip/chip-build-vscode:1"
env:
- PW_ENVIRONMENT_ROOT=/pwenv
args:
Expand Down Expand Up @@ -85,7 +85,7 @@ steps:
--target k32w-shell
build
--create-archives /workspace/artifacts/
- name: "connectedhomeip/chip-build-vscode:0.7.25"
- name: "ghcr.io/project-chip/chip-build-vscode:1"
env:
- PW_ENVIRONMENT_ROOT=/pwenv
args:
Expand Down
6 changes: 3 additions & 3 deletions integrations/cloudbuild/chef.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
steps:
- name: "connectedhomeip/chip-build-vscode:0.7.25"
- name: "ghcr.io/project-chip/chip-build-vscode:1"
env:
- PW_ENVIRONMENT_ROOT=/pwenv
args:
Expand All @@ -12,7 +12,7 @@ steps:
path: /pwenv
timeout: 2700s

- name: "connectedhomeip/chip-build-vscode:0.7.25"
- name: "ghcr.io/project-chip/chip-build-vscode:1"
env:
- PW_ENVIRONMENT_ROOT=/pwenv
args:
Expand All @@ -26,7 +26,7 @@ steps:
- name: pwenv
path: /pwenv

- name: "connectedhomeip/chip-build-vscode:0.7.25"
- name: "ghcr.io/project-chip/chip-build-vscode:1"
env:
- PW_ENVIRONMENT_ROOT=/pwenv
args:
Expand Down
14 changes: 7 additions & 7 deletions integrations/cloudbuild/smoke-test.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
steps:
- name: "connectedhomeip/chip-build-vscode:0.7.25"
- name: "ghcr.io/project-chip/chip-build-vscode:1"
entrypoint: "bash"
args:
- "-c"
- |
git config --global --add safe.directory "*"
git submodule update --init --recursive
id: Submodules
- name: "connectedhomeip/chip-build-vscode:0.7.25"
- name: "ghcr.io/project-chip/chip-build-vscode:1"
env:
- PW_ENVIRONMENT_ROOT=/pwenv
args:
Expand All @@ -22,7 +22,7 @@ steps:
path: /pwenv
timeout: 900s

- name: "connectedhomeip/chip-build-vscode:0.7.25"
- name: "ghcr.io/project-chip/chip-build-vscode:1"
id: ESP32
env:
- PW_ENVIRONMENT_ROOT=/pwenv
Expand All @@ -42,7 +42,7 @@ steps:
volumes:
- name: pwenv
path: /pwenv
- name: "connectedhomeip/chip-build-vscode:0.7.25"
- name: "ghcr.io/project-chip/chip-build-vscode:1"
id: NRFConnect
env:
- PW_ENVIRONMENT_ROOT=/pwenv
Expand All @@ -63,7 +63,7 @@ steps:
- name: pwenv
path: /pwenv

- name: "connectedhomeip/chip-build-vscode:0.7.25"
- name: "ghcr.io/project-chip/chip-build-vscode:1"
id: EFR32
env:
- PW_ENVIRONMENT_ROOT=/pwenv
Expand All @@ -85,7 +85,7 @@ steps:
- name: pwenv
path: /pwenv

- name: "connectedhomeip/chip-build-vscode:0.7.25"
- name: "ghcr.io/project-chip/chip-build-vscode:1"
id: Linux
env:
- PW_ENVIRONMENT_ROOT=/pwenv
Expand Down Expand Up @@ -138,7 +138,7 @@ steps:
- name: pwenv
path: /pwenv

- name: "connectedhomeip/chip-build-vscode:0.7.25"
- name: "ghcr.io/project-chip/chip-build-vscode:1"
id: Android
env:
- PW_ENVIRONMENT_ROOT=/pwenv
Expand Down
11 changes: 11 additions & 0 deletions scripts/py_matter_yamltests/matter_yamltests/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,17 @@ def __init__(self, content):
self.tag_key_with_error(content, 'response')


class TestStepGroupEndPointError(TestStepError):
"""Raise when a test step targeting a group of nodes targets an endpoint."""

def __init__(self, content):
message = 'Group command should not target an endpoint'
super().__init__(message)

self.tag_key_with_error(content, 'groupId')
self.tag_key_with_error(content, 'endpoint')


class TestStepVerificationStandaloneError(TestStepError):
"""Raise when a test step with a verification key is enabled and not interactive."""

Expand Down
Loading

0 comments on commit a2f543b

Please sign in to comment.