From 59ab3ad629452a7a78b04db117b7ea7a98626100 Mon Sep 17 00:00:00 2001 From: Vivien Nicolas Date: Tue, 17 Jan 2023 18:43:31 +0100 Subject: [PATCH 1/7] =?UTF-8?q?Fix=20some=20typos=20in=20src/app/tests/sui?= =?UTF-8?q?tes/certification/Test=5FTC=5FCADMIN=5F1=E2=80=A6=20(#24471)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fix some typos in src/app/tests/suites/certification/Test_TC_CADMIN_1_*.yaml * Update generated tests content --- .../certification/Test_TC_CADMIN_1_11.yaml | 44 +++++------- .../certification/Test_TC_CADMIN_1_13.yaml | 48 ++++++------- .../certification/Test_TC_CADMIN_1_15.yaml | 34 ++++----- .../certification/Test_TC_CADMIN_1_16.yaml | 22 +++--- .../certification/Test_TC_CADMIN_1_21.yaml | 4 -- .../certification/Test_TC_CADMIN_1_22.yaml | 12 ++-- .../certification/Test_TC_CADMIN_1_23.yaml | 4 -- .../certification/Test_TC_CADMIN_1_24.yaml | 12 ++-- .../certification/Test_TC_CADMIN_1_3.yaml | 22 +++--- .../certification/Test_TC_CADMIN_1_4.yaml | 10 +-- .../certification/Test_TC_CADMIN_1_5.yaml | 30 ++++---- .../certification/Test_TC_CADMIN_1_9.yaml | 6 +- .../chip-tool/zap-generated/test/Commands.h | 72 +++++++++++++++++++ 13 files changed, 179 insertions(+), 141 deletions(-) diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_11.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_11.yaml index 01b4346d7dd741..8854f10aaf290c 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_11.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_11.yaml @@ -79,11 +79,11 @@ tests: value: 180 - name: "PAKEPasscodeVerifier" value: PakeVerifier - - name: "discriminator" + - name: "Discriminator" value: discriminator - - name: "iterations" + - name: "Iterations" value: 1000 - - name: "salt" + - name: "Salt" value: "SPAKE2P Key Salt" #Check for DNS-SD advertisement CM is not possible in YAML @@ -148,11 +148,11 @@ tests: value: 180 - name: "PAKEPasscodeVerifier" value: PakeVerifier - - name: "discriminator" + - name: "Discriminator" value: discriminator - - name: "iterations" + - name: "Iterations" value: 1000 - - name: "salt" + - name: "Salt" value: "SPAKE2P Key Salt" - label: "TH_CR2 starts a commissioning process with DUT_CE" @@ -188,11 +188,11 @@ tests: value: 180 - name: "PAKEPasscodeVerifier" value: PakeVerifier - - name: "discriminator" + - name: "Discriminator" value: discriminator - - name: "iterations" + - name: "Iterations" value: 1000 - - name: "salt" + - name: "Salt" value: "SPAKE2P Key Salt" - label: @@ -209,11 +209,11 @@ tests: value: 180 - name: "PAKEPasscodeVerifier" value: PakeVerifier - - name: "discriminator" + - name: "Discriminator" value: discriminator - - name: "iterations" + - name: "Iterations" value: 1000 - - name: "salt" + - name: "Salt" value: "SPAKE2P Key Salt" response: error: FAILURE @@ -228,9 +228,9 @@ tests: response: value: [ - { Label: "", nodeId: nodeId }, - { Label: "", nodeId: nodeId3 }, - { Label: "", nodeID: nodeId2 }, + { Label: "", NodeId: nodeId }, + { Label: "", NodeId: nodeId3 }, + { Label: "", NodeId: nodeId2 }, ] constraints: type: list @@ -256,8 +256,6 @@ tests: values: - name: "CommissioningTimeout" value: 180 - - name: "discriminator" - value: discriminator #Check for DNS-SD advertisement CM is not possible in YAML - label: "Verify that the DNS-SD advertisement shows CM=1" @@ -294,8 +292,6 @@ tests: values: - name: "CommissioningTimeout" value: 180 - - name: "discriminator" - value: discriminator response: error: FAILURE clusterError: 2 @@ -319,9 +315,9 @@ tests: response: value: [ - { Label: "", nodeId: nodeId }, - { Label: "", nodeId: nodeId3 }, - { Label: "", nodeID: nodeId2 }, + { Label: "", NodeId: nodeId }, + { Label: "", NodeId: nodeId3 }, + { Label: "", NodeId: nodeId2 }, ] constraints: type: list @@ -335,8 +331,6 @@ tests: values: - name: "CommissioningTimeout" value: 180 - - name: "discriminator" - value: discriminator - label: "Before the expiration of PIXIT.CADMIN.CwDuration seconds that was set @@ -351,8 +345,6 @@ tests: values: - name: "CommissioningTimeout" value: 180 - - name: "discriminator" - value: discriminator response: error: FAILURE clusterError: 2 diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_13.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_13.yaml index 942bebf92c6f7c..7c1841955ed161 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_13.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_13.yaml @@ -83,8 +83,6 @@ tests: values: - name: "CommissioningTimeout" value: 180 - - name: "discriminator" - value: discriminator - label: "TH_CR1 reads WindowStatus attribute from DUT_CE" cluster: "AdministratorCommissioning" @@ -238,8 +236,6 @@ tests: values: - name: "CommissioningTimeout" value: 180 - - name: "discriminator" - value: discriminator - label: "TH_CR2 starts a commissioning process with DUT_CE" identity: "beta" @@ -271,8 +267,6 @@ tests: values: - name: "CommissioningTimeout" value: 180 - - name: "discriminator" - value: discriminator - label: "TH_CR1 opens a 2nd commissioning window on DUT_CE" identity: "alpha" @@ -286,11 +280,11 @@ tests: value: 180 - name: "PAKEPasscodeVerifier" value: PakeVerifier - - name: "discriminator" + - name: "Discriminator" value: discriminator - - name: "iterations" + - name: "Iterations" value: 1000 - - name: "salt" + - name: "Salt" value: "SPAKE2P Key Salt" response: error: FAILURE @@ -306,9 +300,9 @@ tests: response: value: [ - { Label: "", nodeId: nodeId }, - { Label: "", nodeId: nodeId2 }, - { Label: "", nodeID: nodeId3 }, + { Label: "", NodeId: nodeId }, + { Label: "", NodeId: nodeId2 }, + { Label: "", NodeId: nodeId3 }, ] constraints: type: list @@ -333,11 +327,11 @@ tests: value: 180 - name: "PAKEPasscodeVerifier" value: PakeVerifier - - name: "discriminator" + - name: "Discriminator" value: discriminator - - name: "iterations" + - name: "Iterations" value: 1000 - - name: "salt" + - name: "Salt" value: "SPAKE2P Key Salt" - label: "TH_CR1 reads WindowStatus attribute from DUT_CE" @@ -388,11 +382,11 @@ tests: value: 180 - name: "PAKEPasscodeVerifier" value: PakeVerifier - - name: "discriminator" + - name: "Discriminator" value: discriminator - - name: "iterations" + - name: "Iterations" value: 1000 - - name: "salt" + - name: "Salt" value: "SPAKE2P Key Salt" response: error: FAILURE @@ -408,9 +402,9 @@ tests: response: value: [ - { Label: "", nodeId: nodeId }, - { Label: "", nodeId: nodeId2 }, - { Label: "", nodeID: nodeId3 }, + { Label: "", NodeId: nodeId }, + { Label: "", NodeId: nodeId2 }, + { Label: "", NodeId: nodeId3 }, ] constraints: type: list @@ -435,11 +429,11 @@ tests: value: 180 - name: "PAKEPasscodeVerifier" value: PakeVerifier - - name: "discriminator" + - name: "Discriminator" value: discriminator - - name: "iterations" + - name: "Iterations" value: 1000 - - name: "salt" + - name: "Salt" value: "SPAKE2P Key Salt" - label: "TH_CR2 opens a 2nd commissioning window on DUT_CE using ECM" @@ -454,11 +448,11 @@ tests: value: 180 - name: "PAKEPasscodeVerifier" value: PakeVerifier - - name: "discriminator" + - name: "Discriminator" value: discriminator - - name: "iterations" + - name: "Iterations" value: 1000 - - name: "salt" + - name: "Salt" value: "SPAKE2P Key Salt" response: error: FAILURE diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_15.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_15.yaml index 2ca257d2b6bb8d..17f77d3a3274ec 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_15.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_15.yaml @@ -79,11 +79,11 @@ tests: value: 180 - name: "PAKEPasscodeVerifier" value: PakeVerifier - - name: "discriminator" + - name: "Discriminator" value: discriminator - - name: "iterations" + - name: "Iterations" value: 1000 - - name: "salt" + - name: "Salt" value: "SPAKE2P Key Salt" - label: "TH_CR2 starts a commissioning process with DUT_CE" @@ -120,11 +120,11 @@ tests: value: 180 - name: "PAKEPasscodeVerifier" value: PakeVerifier - - name: "discriminator" + - name: "Discriminator" value: discriminator - - name: "iterations" + - name: "Iterations" value: 1000 - - name: "salt" + - name: "Salt" value: "SPAKE2P Key Salt" - label: "TH_CR3 Commissions with DUT_CE" @@ -159,9 +159,9 @@ tests: response: value: [ - { Label: "", FabricIndex: 1, nodeId: nodeId }, - { Label: "", FabricIndex: 2, nodeId: nodeId2 }, - { Label: "", FabricIndex: 3, nodeID: nodeId3 }, + { Label: "", FabricIndex: 1, NodeId: nodeId }, + { Label: "", FabricIndex: 2, NodeId: nodeId2 }, + { Label: "", FabricIndex: 3, NodeId: nodeId3 }, ] constraints: type: list @@ -222,8 +222,8 @@ tests: response: value: [ - { Label: "", FabricIndex: 1, nodeId: nodeId }, - { Label: "", FabricIndex: 3, nodeID: nodeId3 }, + { Label: "", FabricIndex: 1, NodeId: nodeId }, + { Label: "", FabricIndex: 3, NodeId: nodeId3 }, ] constraints: type: list @@ -270,11 +270,11 @@ tests: value: 180 - name: "PAKEPasscodeVerifier" value: PakeVerifier - - name: "discriminator" + - name: "Discriminator" value: discriminator - - name: "iterations" + - name: "Iterations" value: 1000 - - name: "salt" + - name: "Salt" value: "SPAKE2P Key Salt" - label: "TH_CR2 starts a commissioning process with DUT_CE" @@ -309,9 +309,9 @@ tests: response: value: [ - { Label: "", FabricIndex: 1, nodeId: nodeId }, - { Label: "", FabricIndex: 4, nodeId: nodeId2 }, - { Label: "", FabricIndex: 3, nodeID: nodeId3 }, + { Label: "", FabricIndex: 1, NodeId: nodeId }, + { Label: "", FabricIndex: 4, NodeId: nodeId2 }, + { Label: "", FabricIndex: 3, NodeId: nodeId3 }, ] constraints: type: list diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_16.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_16.yaml index 9e2a503373925c..eed27eb63d6548 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_16.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_16.yaml @@ -75,8 +75,6 @@ tests: values: - name: "CommissioningTimeout" value: 180 - - name: "discriminator" - value: discriminator - label: "TH_CR2 starts a commissioning process with DUT_CE" identity: "beta" @@ -110,8 +108,6 @@ tests: values: - name: "CommissioningTimeout" value: 180 - - name: "discriminator" - value: discriminator - label: "TH_CR3 Commissions with DUT_CE" PICS: CADMIN.S @@ -145,9 +141,9 @@ tests: response: value: [ - { Label: "", FabricIndex: 1, nodeId: nodeId }, - { Label: "", FabricIndex: 2, nodeId: nodeId2 }, - { Label: "", FabricIndex: 3, nodeID: nodeId3 }, + { Label: "", FabricIndex: 1, NodeId: nodeId }, + { Label: "", FabricIndex: 2, NodeId: nodeId2 }, + { Label: "", FabricIndex: 3, NodeId: nodeId3 }, ] constraints: type: list @@ -208,8 +204,8 @@ tests: response: value: [ - { Label: "", FabricIndex: 1, nodeId: nodeId }, - { Label: "", FabricIndex: 3, nodeID: nodeId3 }, + { Label: "", FabricIndex: 1, NodeId: nodeId }, + { Label: "", FabricIndex: 3, NodeId: nodeId3 }, ] constraints: type: list @@ -224,8 +220,6 @@ tests: values: - name: "CommissioningTimeout" value: 180 - - name: "discriminator" - value: discriminator - label: "TH_CR2 starts a commissioning process with DUT_CE" identity: "beta" @@ -259,9 +253,9 @@ tests: response: value: [ - { Label: "", FabricIndex: 1, nodeId: nodeId }, - { Label: "", FabricIndex: 4, nodeId: nodeId2 }, - { Label: "", FabricIndex: 3, nodeID: nodeId3 }, + { Label: "", FabricIndex: 1, NodeId: nodeId }, + { Label: "", FabricIndex: 4, NodeId: nodeId2 }, + { Label: "", FabricIndex: 3, NodeId: nodeId3 }, ] constraints: type: list diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_21.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_21.yaml index 3b49df915b30db..bf406e89eef9b5 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_21.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_21.yaml @@ -66,8 +66,6 @@ tests: values: - name: "CommissioningTimeout" value: 900 - - name: "discriminator" - value: discriminator - label: "Wait for commissioning Window to 901 seconds" cluster: "DelayCommands" @@ -95,8 +93,6 @@ tests: values: - name: "CommissioningTimeout" value: 901 - - name: "discriminator" - value: discriminator response: error: INVALID_COMMAND diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_22.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_22.yaml index 84e037d2b82867..bf49318f426879 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_22.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_22.yaml @@ -70,11 +70,11 @@ tests: value: 900 - name: "PAKEPasscodeVerifier" value: PakeVerifier - - name: "discriminator" + - name: "Discriminator" value: discriminator - - name: "iterations" + - name: "Iterations" value: 1000 - - name: "salt" + - name: "Salt" value: "SPAKE2P Key Salt" - label: "Wait for commissioning Window to 901 seconds" @@ -105,11 +105,11 @@ tests: value: 901 - name: "PAKEPasscodeVerifier" value: PakeVerifier - - name: "discriminator" + - name: "Discriminator" value: discriminator - - name: "iterations" + - name: "Iterations" value: 1000 - - name: "salt" + - name: "Salt" value: "SPAKE2P Key Salt" response: error: INVALID_COMMAND diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_23.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_23.yaml index f014b0272aabe3..af87d1682cadd6 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_23.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_23.yaml @@ -66,8 +66,6 @@ tests: values: - name: "CommissioningTimeout" value: 180 - - name: "discriminator" - value: discriminator - label: "Wait for commissioning Window to 181 seconds" cluster: "DelayCommands" @@ -95,8 +93,6 @@ tests: values: - name: "CommissioningTimeout" value: 179 - - name: "discriminator" - value: discriminator response: error: INVALID_COMMAND diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_24.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_24.yaml index 5a2b03b10de03f..6fea52d25582a4 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_24.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_24.yaml @@ -70,11 +70,11 @@ tests: value: 180 - name: "PAKEPasscodeVerifier" value: PakeVerifier - - name: "discriminator" + - name: "Discriminator" value: discriminator - - name: "iterations" + - name: "Iterations" value: 1000 - - name: "salt" + - name: "Salt" value: "SPAKE2P Key Salt" - label: "Wait for commissioning Window to 181 seconds" @@ -105,11 +105,11 @@ tests: value: 179 - name: "PAKEPasscodeVerifier" value: PakeVerifier - - name: "discriminator" + - name: "Discriminator" value: discriminator - - name: "iterations" + - name: "Iterations" value: 1000 - - name: "salt" + - name: "Salt" value: "SPAKE2P Key Salt" response: error: INVALID_COMMAND diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_3.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_3.yaml index 8a820898be43c4..3538085ce68314 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_3.yaml @@ -73,11 +73,11 @@ tests: value: 180 - name: "PAKEPasscodeVerifier" value: PakeVerifier - - name: "discriminator" + - name: "Discriminator" value: discriminator - - name: "iterations" + - name: "Iterations" value: 1000 - - name: "salt" + - name: "Salt" value: "SPAKE2P Key Salt" #Check for DNS-SD advertisement CM is not possible in YAML @@ -187,7 +187,7 @@ tests: PICS: OPCREDS.S.A0001 fabricFiltered: false response: - value: [{ Label: "", nodeId: nodeId }, { Label: "", nodeId: nodeId2 }] + value: [{ Label: "", NodeId: nodeId }, { Label: "", NodeId: nodeId2 }] constraints: type: list @@ -199,7 +199,7 @@ tests: PICS: OPCREDS.S.A0001 fabricFiltered: false response: - value: [{ Label: "", nodeId: nodeId }, { Label: "", nodeId: nodeId2 }] + value: [{ Label: "", NodeId: nodeId }, { Label: "", NodeId: nodeId2 }] constraints: type: list @@ -263,11 +263,11 @@ tests: value: 180 - name: "PAKEPasscodeVerifier" value: PakeVerifier - - name: "discriminator" + - name: "Discriminator" value: discriminator - - name: "iterations" + - name: "Iterations" value: 1000 - - name: "salt" + - name: "Salt" value: "SPAKE2P Key Salt" - label: "Wait for the commissioning window in step 13 to timeout" @@ -299,11 +299,11 @@ tests: value: 180 - name: "PAKEPasscodeVerifier" value: PakeVerifier - - name: "discriminator" + - name: "Discriminator" value: discriminator - - name: "iterations" + - name: "Iterations" value: 1000 - - name: "salt" + - name: "Salt" value: "SPAKE2P Key Salt" - label: diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_4.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_4.yaml index 5dfc34a509f2be..dd452dca5993f2 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_4.yaml @@ -69,8 +69,6 @@ tests: values: - name: "CommissioningTimeout" value: 180 - - name: "discriminator" - value: discriminator #Check for DNS-SD advertisement CM is not possible in YAML - label: "Verify that the DNS-SD advertisement shows CM=1" @@ -176,7 +174,7 @@ tests: attribute: "Fabrics" fabricFiltered: false response: - value: [{ Label: "", nodeId: nodeId }, { Label: "", nodeId: nodeId2 }] + value: [{ Label: "", NodeId: nodeId }, { Label: "", NodeId: nodeId2 }] constraints: type: list @@ -188,7 +186,7 @@ tests: PICS: OPCREDS.S.A0001 fabricFiltered: false response: - value: [{ Label: "", nodeId: nodeId }, { Label: "", nodeId: nodeId2 }] + value: [{ Label: "", NodeId: nodeId }, { Label: "", NodeId: nodeId2 }] constraints: type: list @@ -250,8 +248,6 @@ tests: values: - name: "CommissioningTimeout" value: 180 - - name: "discriminator" - value: discriminator - label: "Wait for the commissioning window in step 13 to timeout" cluster: "DelayCommands" @@ -280,8 +276,6 @@ tests: values: - name: "CommissioningTimeout" value: 180 - - name: "discriminator" - value: discriminator - label: "TH_CR1 starts a commissioning process with DUT_CE before the timeout diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_5.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_5.yaml index b8e661252cc609..d875e904cd0754 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_5.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_5.yaml @@ -84,11 +84,11 @@ tests: value: 180 - name: "PAKEPasscodeVerifier" value: PakeVerifier - - name: "discriminator" + - name: "Discriminator" value: discriminator - - name: "iterations" + - name: "Iterations" value: 1000 - - name: "salt" + - name: "Salt" value: "SPAKE2P Key Salt" #Check for DNS-SD advertisement CM is not possible in YAML @@ -146,11 +146,11 @@ tests: value: 180 - name: "PAKEPasscodeVerifier" value: PakeVerifier - - name: "discriminator" + - name: "Discriminator" value: discriminator - - name: "iterations" + - name: "Iterations" value: 1000 - - name: "salt" + - name: "Salt" value: "SPAKE2P Key Salt" - label: "TH_CR1 revokes the commissioning window on DUT_CE" @@ -210,11 +210,11 @@ tests: value: 180 - name: "PAKEPasscodeVerifier" value: IncorrectPakeVerifier - - name: "discriminator" + - name: "Discriminator" value: discriminator - - name: "iterations" + - name: "Iterations" value: 1000 - - name: "salt" + - name: "Salt" value: "SPAKE2P Key Salt" response: error: FAILURE @@ -231,11 +231,11 @@ tests: value: 180 - name: "PAKEPasscodeVerifier" value: PakeVerifier - - name: "discriminator" + - name: "Discriminator" value: discriminator - - name: "iterations" + - name: "Iterations" value: 1000 - - name: "salt" + - name: "Salt" value: "SPAKE2P Key Salt" - label: "TH_CR1 opens another commissioning window on DUT_CE using ECM" @@ -249,11 +249,11 @@ tests: value: 180 - name: "PAKEPasscodeVerifier" value: PakeVerifier - - name: "discriminator" + - name: "Discriminator" value: discriminator - - name: "iterations" + - name: "Iterations" value: 1000 - - name: "salt" + - name: "Salt" value: "SPAKE2P Key Salt" response: error: FAILURE diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_9.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_9.yaml index f1b77997567ffb..271bff73b81104 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_9.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_9.yaml @@ -84,11 +84,11 @@ tests: value: 900 - name: "PAKEPasscodeVerifier" value: PakeVerifier - - name: "discriminator" + - name: "Discriminator" value: discriminator - - name: "iterations" + - name: "Iterations" value: 1000 - - name: "salt" + - name: "Salt" value: "SPAKE2P Key Salt" #Check for DNS-SD advertisement CM is not possible in YAML diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 4e0836a8e5318b..dc87f0924aa18c 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -97278,10 +97278,16 @@ class Test_TC_CADMIN_1_11Suite : public TestCommand { auto iter_0 = value.begin(); VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 0)); + VerifyOrReturn(CheckValue("fabrics[0].nodeId", iter_0.GetValue().nodeId, + mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL)); VerifyOrReturn(CheckValueAsString("fabrics[0].label", iter_0.GetValue().label, chip::CharSpan("", 0))); VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 1)); + VerifyOrReturn(CheckValue("fabrics[1].nodeId", iter_0.GetValue().nodeId, + mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL)); VerifyOrReturn(CheckValueAsString("fabrics[1].label", iter_0.GetValue().label, chip::CharSpan("", 0))); VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 2)); + VerifyOrReturn(CheckValue("fabrics[2].nodeId", iter_0.GetValue().nodeId, + mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL)); VerifyOrReturn(CheckValueAsString("fabrics[2].label", iter_0.GetValue().label, chip::CharSpan("", 0))); VerifyOrReturn(CheckNoMoreListItems("fabrics", iter_0, 3)); } @@ -97318,10 +97324,16 @@ class Test_TC_CADMIN_1_11Suite : public TestCommand { auto iter_0 = value.begin(); VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 0)); + VerifyOrReturn(CheckValue("fabrics[0].nodeId", iter_0.GetValue().nodeId, + mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL)); VerifyOrReturn(CheckValueAsString("fabrics[0].label", iter_0.GetValue().label, chip::CharSpan("", 0))); VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 1)); + VerifyOrReturn(CheckValue("fabrics[1].nodeId", iter_0.GetValue().nodeId, + mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL)); VerifyOrReturn(CheckValueAsString("fabrics[1].label", iter_0.GetValue().label, chip::CharSpan("", 0))); VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 2)); + VerifyOrReturn(CheckValue("fabrics[2].nodeId", iter_0.GetValue().nodeId, + mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL)); VerifyOrReturn(CheckValueAsString("fabrics[2].label", iter_0.GetValue().label, chip::CharSpan("", 0))); VerifyOrReturn(CheckNoMoreListItems("fabrics", iter_0, 3)); } @@ -97859,12 +97871,18 @@ class Test_TC_CADMIN_1_15Suite : public TestCommand { auto iter_0 = value.begin(); VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 0)); + VerifyOrReturn(CheckValue("fabrics[0].nodeId", iter_0.GetValue().nodeId, + mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL)); VerifyOrReturn(CheckValueAsString("fabrics[0].label", iter_0.GetValue().label, chip::CharSpan("", 0))); VerifyOrReturn(CheckValue("fabrics[0].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 1)); + VerifyOrReturn(CheckValue("fabrics[1].nodeId", iter_0.GetValue().nodeId, + mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL)); VerifyOrReturn(CheckValueAsString("fabrics[1].label", iter_0.GetValue().label, chip::CharSpan("", 0))); VerifyOrReturn(CheckValue("fabrics[1].fabricIndex", iter_0.GetValue().fabricIndex, 2U)); VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 2)); + VerifyOrReturn(CheckValue("fabrics[2].nodeId", iter_0.GetValue().nodeId, + mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL)); VerifyOrReturn(CheckValueAsString("fabrics[2].label", iter_0.GetValue().label, chip::CharSpan("", 0))); VerifyOrReturn(CheckValue("fabrics[2].fabricIndex", iter_0.GetValue().fabricIndex, 3U)); VerifyOrReturn(CheckNoMoreListItems("fabrics", iter_0, 3)); @@ -97896,9 +97914,13 @@ class Test_TC_CADMIN_1_15Suite : public TestCommand { auto iter_0 = value.begin(); VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 0)); + VerifyOrReturn(CheckValue("fabrics[0].nodeId", iter_0.GetValue().nodeId, + mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL)); VerifyOrReturn(CheckValueAsString("fabrics[0].label", iter_0.GetValue().label, chip::CharSpan("", 0))); VerifyOrReturn(CheckValue("fabrics[0].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 1)); + VerifyOrReturn(CheckValue("fabrics[1].nodeId", iter_0.GetValue().nodeId, + mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL)); VerifyOrReturn(CheckValueAsString("fabrics[1].label", iter_0.GetValue().label, chip::CharSpan("", 0))); VerifyOrReturn(CheckValue("fabrics[1].fabricIndex", iter_0.GetValue().fabricIndex, 3U)); VerifyOrReturn(CheckNoMoreListItems("fabrics", iter_0, 2)); @@ -97931,12 +97953,18 @@ class Test_TC_CADMIN_1_15Suite : public TestCommand { auto iter_0 = value.begin(); VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 0)); + VerifyOrReturn(CheckValue("fabrics[0].nodeId", iter_0.GetValue().nodeId, + mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL)); VerifyOrReturn(CheckValueAsString("fabrics[0].label", iter_0.GetValue().label, chip::CharSpan("", 0))); VerifyOrReturn(CheckValue("fabrics[0].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 1)); + VerifyOrReturn(CheckValue("fabrics[1].nodeId", iter_0.GetValue().nodeId, + mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL)); VerifyOrReturn(CheckValueAsString("fabrics[1].label", iter_0.GetValue().label, chip::CharSpan("", 0))); VerifyOrReturn(CheckValue("fabrics[1].fabricIndex", iter_0.GetValue().fabricIndex, 4U)); VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 2)); + VerifyOrReturn(CheckValue("fabrics[2].nodeId", iter_0.GetValue().nodeId, + mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL)); VerifyOrReturn(CheckValueAsString("fabrics[2].label", iter_0.GetValue().label, chip::CharSpan("", 0))); VerifyOrReturn(CheckValue("fabrics[2].fabricIndex", iter_0.GetValue().fabricIndex, 3U)); VerifyOrReturn(CheckNoMoreListItems("fabrics", iter_0, 3)); @@ -98274,12 +98302,18 @@ class Test_TC_CADMIN_1_16Suite : public TestCommand { auto iter_0 = value.begin(); VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 0)); + VerifyOrReturn(CheckValue("fabrics[0].nodeId", iter_0.GetValue().nodeId, + mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL)); VerifyOrReturn(CheckValueAsString("fabrics[0].label", iter_0.GetValue().label, chip::CharSpan("", 0))); VerifyOrReturn(CheckValue("fabrics[0].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 1)); + VerifyOrReturn(CheckValue("fabrics[1].nodeId", iter_0.GetValue().nodeId, + mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL)); VerifyOrReturn(CheckValueAsString("fabrics[1].label", iter_0.GetValue().label, chip::CharSpan("", 0))); VerifyOrReturn(CheckValue("fabrics[1].fabricIndex", iter_0.GetValue().fabricIndex, 2U)); VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 2)); + VerifyOrReturn(CheckValue("fabrics[2].nodeId", iter_0.GetValue().nodeId, + mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL)); VerifyOrReturn(CheckValueAsString("fabrics[2].label", iter_0.GetValue().label, chip::CharSpan("", 0))); VerifyOrReturn(CheckValue("fabrics[2].fabricIndex", iter_0.GetValue().fabricIndex, 3U)); VerifyOrReturn(CheckNoMoreListItems("fabrics", iter_0, 3)); @@ -98311,9 +98345,13 @@ class Test_TC_CADMIN_1_16Suite : public TestCommand { auto iter_0 = value.begin(); VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 0)); + VerifyOrReturn(CheckValue("fabrics[0].nodeId", iter_0.GetValue().nodeId, + mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL)); VerifyOrReturn(CheckValueAsString("fabrics[0].label", iter_0.GetValue().label, chip::CharSpan("", 0))); VerifyOrReturn(CheckValue("fabrics[0].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 1)); + VerifyOrReturn(CheckValue("fabrics[1].nodeId", iter_0.GetValue().nodeId, + mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL)); VerifyOrReturn(CheckValueAsString("fabrics[1].label", iter_0.GetValue().label, chip::CharSpan("", 0))); VerifyOrReturn(CheckValue("fabrics[1].fabricIndex", iter_0.GetValue().fabricIndex, 3U)); VerifyOrReturn(CheckNoMoreListItems("fabrics", iter_0, 2)); @@ -98342,12 +98380,18 @@ class Test_TC_CADMIN_1_16Suite : public TestCommand { auto iter_0 = value.begin(); VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 0)); + VerifyOrReturn(CheckValue("fabrics[0].nodeId", iter_0.GetValue().nodeId, + mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL)); VerifyOrReturn(CheckValueAsString("fabrics[0].label", iter_0.GetValue().label, chip::CharSpan("", 0))); VerifyOrReturn(CheckValue("fabrics[0].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 1)); + VerifyOrReturn(CheckValue("fabrics[1].nodeId", iter_0.GetValue().nodeId, + mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL)); VerifyOrReturn(CheckValueAsString("fabrics[1].label", iter_0.GetValue().label, chip::CharSpan("", 0))); VerifyOrReturn(CheckValue("fabrics[1].fabricIndex", iter_0.GetValue().fabricIndex, 4U)); VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 2)); + VerifyOrReturn(CheckValue("fabrics[2].nodeId", iter_0.GetValue().nodeId, + mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL)); VerifyOrReturn(CheckValueAsString("fabrics[2].label", iter_0.GetValue().label, chip::CharSpan("", 0))); VerifyOrReturn(CheckValue("fabrics[2].fabricIndex", iter_0.GetValue().fabricIndex, 3U)); VerifyOrReturn(CheckNoMoreListItems("fabrics", iter_0, 3)); @@ -99304,8 +99348,12 @@ class Test_TC_CADMIN_1_3Suite : public TestCommand { auto iter_0 = value.begin(); VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 0)); + VerifyOrReturn(CheckValue("fabrics[0].nodeId", iter_0.GetValue().nodeId, + mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL)); VerifyOrReturn(CheckValueAsString("fabrics[0].label", iter_0.GetValue().label, chip::CharSpan("", 0))); VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 1)); + VerifyOrReturn(CheckValue("fabrics[1].nodeId", iter_0.GetValue().nodeId, + mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL)); VerifyOrReturn(CheckValueAsString("fabrics[1].label", iter_0.GetValue().label, chip::CharSpan("", 0))); VerifyOrReturn(CheckNoMoreListItems("fabrics", iter_0, 2)); } @@ -99322,8 +99370,12 @@ class Test_TC_CADMIN_1_3Suite : public TestCommand { auto iter_0 = value.begin(); VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 0)); + VerifyOrReturn(CheckValue("fabrics[0].nodeId", iter_0.GetValue().nodeId, + mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL)); VerifyOrReturn(CheckValueAsString("fabrics[0].label", iter_0.GetValue().label, chip::CharSpan("", 0))); VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 1)); + VerifyOrReturn(CheckValue("fabrics[1].nodeId", iter_0.GetValue().nodeId, + mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL)); VerifyOrReturn(CheckValueAsString("fabrics[1].label", iter_0.GetValue().label, chip::CharSpan("", 0))); VerifyOrReturn(CheckNoMoreListItems("fabrics", iter_0, 2)); } @@ -99718,8 +99770,12 @@ class Test_TC_CADMIN_1_4Suite : public TestCommand { auto iter_0 = value.begin(); VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 0)); + VerifyOrReturn(CheckValue("fabrics[0].nodeId", iter_0.GetValue().nodeId, + mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL)); VerifyOrReturn(CheckValueAsString("fabrics[0].label", iter_0.GetValue().label, chip::CharSpan("", 0))); VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 1)); + VerifyOrReturn(CheckValue("fabrics[1].nodeId", iter_0.GetValue().nodeId, + mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL)); VerifyOrReturn(CheckValueAsString("fabrics[1].label", iter_0.GetValue().label, chip::CharSpan("", 0))); VerifyOrReturn(CheckNoMoreListItems("fabrics", iter_0, 2)); } @@ -99736,8 +99792,12 @@ class Test_TC_CADMIN_1_4Suite : public TestCommand { auto iter_0 = value.begin(); VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 0)); + VerifyOrReturn(CheckValue("fabrics[0].nodeId", iter_0.GetValue().nodeId, + mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL)); VerifyOrReturn(CheckValueAsString("fabrics[0].label", iter_0.GetValue().label, chip::CharSpan("", 0))); VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 1)); + VerifyOrReturn(CheckValue("fabrics[1].nodeId", iter_0.GetValue().nodeId, + mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL)); VerifyOrReturn(CheckValueAsString("fabrics[1].label", iter_0.GetValue().label, chip::CharSpan("", 0))); VerifyOrReturn(CheckNoMoreListItems("fabrics", iter_0, 2)); } @@ -101772,10 +101832,16 @@ class Test_TC_CADMIN_1_13Suite : public TestCommand { auto iter_0 = value.begin(); VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 0)); + VerifyOrReturn(CheckValue("fabrics[0].nodeId", iter_0.GetValue().nodeId, + mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL)); VerifyOrReturn(CheckValueAsString("fabrics[0].label", iter_0.GetValue().label, chip::CharSpan("", 0))); VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 1)); + VerifyOrReturn(CheckValue("fabrics[1].nodeId", iter_0.GetValue().nodeId, + mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL)); VerifyOrReturn(CheckValueAsString("fabrics[1].label", iter_0.GetValue().label, chip::CharSpan("", 0))); VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 2)); + VerifyOrReturn(CheckValue("fabrics[2].nodeId", iter_0.GetValue().nodeId, + mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL)); VerifyOrReturn(CheckValueAsString("fabrics[2].label", iter_0.GetValue().label, chip::CharSpan("", 0))); VerifyOrReturn(CheckNoMoreListItems("fabrics", iter_0, 3)); } @@ -101816,10 +101882,16 @@ class Test_TC_CADMIN_1_13Suite : public TestCommand { auto iter_0 = value.begin(); VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 0)); + VerifyOrReturn(CheckValue("fabrics[0].nodeId", iter_0.GetValue().nodeId, + mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL)); VerifyOrReturn(CheckValueAsString("fabrics[0].label", iter_0.GetValue().label, chip::CharSpan("", 0))); VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 1)); + VerifyOrReturn(CheckValue("fabrics[1].nodeId", iter_0.GetValue().nodeId, + mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL)); VerifyOrReturn(CheckValueAsString("fabrics[1].label", iter_0.GetValue().label, chip::CharSpan("", 0))); VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 2)); + VerifyOrReturn(CheckValue("fabrics[2].nodeId", iter_0.GetValue().nodeId, + mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL)); VerifyOrReturn(CheckValueAsString("fabrics[2].label", iter_0.GetValue().label, chip::CharSpan("", 0))); VerifyOrReturn(CheckNoMoreListItems("fabrics", iter_0, 3)); } From af3aa1a841db6015b91e2d0c80320351628606a2 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Tue, 17 Jan 2023 13:58:07 -0500 Subject: [PATCH 2/7] Add availability annotations to new MTRDeviceAttestationDeviceInfo APIs. (#24426) These were just added in https://github.com/project-chip/connectedhomeip/pull/24335 --- src/darwin/Framework/CHIP/MTRDeviceAttestationDelegate.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/darwin/Framework/CHIP/MTRDeviceAttestationDelegate.h b/src/darwin/Framework/CHIP/MTRDeviceAttestationDelegate.h index 992ae5c637c26d..ddc1bdbe3f414f 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceAttestationDelegate.h +++ b/src/darwin/Framework/CHIP/MTRDeviceAttestationDelegate.h @@ -30,12 +30,12 @@ NS_ASSUME_NONNULL_BEGIN /** * The vendor ID for the device from the Device Attestation Certificate. May be nil only if attestation was unsucessful. */ -@property (nonatomic, readonly, nullable) NSNumber * vendorID; +@property (nonatomic, readonly, nullable) NSNumber * vendorID MTR_NEWLY_AVAILABLE; /** * The product ID for the device from the Device Attestation Certificate. May be nil only if attestation was unsucessful. */ -@property (nonatomic, readonly, nullable) NSNumber * productID; +@property (nonatomic, readonly, nullable) NSNumber * productID MTR_NEWLY_AVAILABLE; @property (nonatomic, readonly) MTRCertificateDERBytes dacCertificate; @property (nonatomic, readonly) MTRCertificateDERBytes dacPAICertificate; From f234b94403d682241ea18ab6e9902c9094022a22 Mon Sep 17 00:00:00 2001 From: Kamil Kasperczyk <66371704+kkasperczyk-no@users.noreply.github.com> Date: Tue, 17 Jan 2023 22:14:53 +0100 Subject: [PATCH 3/7] [icd] Removed ICD related methods (former SED) from NoThreadImpl (#24444) There are several methods related to ICD (former SED) used for setting expected communication intervals. Currently they are implemented only for Thread devices and for Wi-Fi the implementation returns unsupported feature through NoThreadImpl. Including this sleep intervals could be useful for some low power Wi-Fi modes too. Changes: * Removed methods implementation from NoThread impl. Now after enabling CHIP_DEVICE_CONFIG_ENABLE_SED (I believe it should be renamed to ICD in the future), the implementation will have to be provided by the proper platform. * Implemented methods for nrfconnect Wi-Fi platform. --- examples/light-switch-app/nrfconnect/Kconfig | 7 ++++++ examples/lock-app/nrfconnect/Kconfig | 7 ++++++ .../GenericConnectivityManagerImpl_NoThread.h | 23 ------------------- .../nrfconnect/CHIPDevicePlatformConfig.h | 4 ++++ .../wifi/ConnectivityManagerImplWiFi.cpp | 20 ++++++++++++++++ .../wifi/ConnectivityManagerImplWiFi.h | 6 +++++ src/platform/nrfconnect/wifi/WiFiManager.h | 5 ++++ 7 files changed, 49 insertions(+), 23 deletions(-) diff --git a/examples/light-switch-app/nrfconnect/Kconfig b/examples/light-switch-app/nrfconnect/Kconfig index 042bdac8f72b68..52da3138003335 100644 --- a/examples/light-switch-app/nrfconnect/Kconfig +++ b/examples/light-switch-app/nrfconnect/Kconfig @@ -40,6 +40,13 @@ config CHIP_ENABLE_SLEEPY_END_DEVICE_SUPPORT endif # NET_L2_OPENTHREAD +if CHIP_WIFI + +config NRF_WIFI_LOW_POWER + default y + +endif # CHIP_WIFI + rsource "../../../config/nrfconnect/chip-module/Kconfig.features" rsource "../../../config/nrfconnect/chip-module/Kconfig.defaults" source "Kconfig.zephyr" diff --git a/examples/lock-app/nrfconnect/Kconfig b/examples/lock-app/nrfconnect/Kconfig index 98ed2d5ce9a9b8..622d825f80e3ef 100644 --- a/examples/lock-app/nrfconnect/Kconfig +++ b/examples/lock-app/nrfconnect/Kconfig @@ -52,6 +52,13 @@ config CHIP_ENABLE_SLEEPY_END_DEVICE_SUPPORT endif # NET_L2_OPENTHREAD +if CHIP_WIFI + +config NRF_WIFI_LOW_POWER + default y + +endif # CHIP_WIFI + rsource "../../../config/nrfconnect/chip-module/Kconfig.features" rsource "../../../config/nrfconnect/chip-module/Kconfig.defaults" source "Kconfig.zephyr" diff --git a/src/include/platform/internal/GenericConnectivityManagerImpl_NoThread.h b/src/include/platform/internal/GenericConnectivityManagerImpl_NoThread.h index 20eec682c8c79c..826430bdc0c143 100755 --- a/src/include/platform/internal/GenericConnectivityManagerImpl_NoThread.h +++ b/src/include/platform/internal/GenericConnectivityManagerImpl_NoThread.h @@ -50,9 +50,6 @@ class GenericConnectivityManagerImpl_NoThread bool _IsThreadApplicationControlled(void); ConnectivityManager::ThreadDeviceType _GetThreadDeviceType(void); CHIP_ERROR _SetThreadDeviceType(ConnectivityManager::ThreadDeviceType deviceType); - CHIP_ERROR _GetSEDIntervalsConfig(ConnectivityManager::SEDIntervalsConfig & intervalsConfig); - CHIP_ERROR _SetSEDIntervalsConfig(const ConnectivityManager::SEDIntervalsConfig & intervalsConfig); - CHIP_ERROR _RequestSEDActiveMode(bool onOff, bool delayIdle = false); bool _IsThreadAttached(void); bool _IsThreadProvisioned(void); void _ErasePersistentInfo(void); @@ -115,26 +112,6 @@ GenericConnectivityManagerImpl_NoThread::_SetThreadDeviceType(Connect return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; } -template -inline CHIP_ERROR GenericConnectivityManagerImpl_NoThread::_GetSEDIntervalsConfig( - ConnectivityManager::SEDIntervalsConfig & intervalsConfig) -{ - return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; -} - -template -inline CHIP_ERROR GenericConnectivityManagerImpl_NoThread::_SetSEDIntervalsConfig( - const ConnectivityManager::SEDIntervalsConfig & intervalsConfig) -{ - return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; -} - -template -inline CHIP_ERROR GenericConnectivityManagerImpl_NoThread::_RequestSEDActiveMode(bool onOff, bool delayIdle) -{ - return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; -} - template inline void GenericConnectivityManagerImpl_NoThread::_ResetThreadNetworkDiagnosticsCounts() {} diff --git a/src/platform/nrfconnect/CHIPDevicePlatformConfig.h b/src/platform/nrfconnect/CHIPDevicePlatformConfig.h index 5a82f16ad4e9d8..098cf0786816fc 100644 --- a/src/platform/nrfconnect/CHIPDevicePlatformConfig.h +++ b/src/platform/nrfconnect/CHIPDevicePlatformConfig.h @@ -216,6 +216,10 @@ #define CHIP_DEVICE_CONFIG_THREAD_SSED CONFIG_CHIP_THREAD_SSED #endif // CONFIG_CHIP_ENABLE_SLEEPY_END_DEVICE_SUPPORT +#ifdef CONFIG_NRF_WIFI_LOW_POWER +#define CHIP_DEVICE_CONFIG_ENABLE_SED 1 +#endif // CONFIG_NRF_WIFI_LOW_POWER + #ifndef CHIP_DEVICE_CONFIG_SED_IDLE_INTERVAL #ifdef CONFIG_CHIP_SED_IDLE_INTERVAL #define CHIP_DEVICE_CONFIG_SED_IDLE_INTERVAL chip::System::Clock::Milliseconds32(CONFIG_CHIP_SED_IDLE_INTERVAL) diff --git a/src/platform/nrfconnect/wifi/ConnectivityManagerImplWiFi.cpp b/src/platform/nrfconnect/wifi/ConnectivityManagerImplWiFi.cpp index b3bdede0f2f852..93559822ef6d82 100644 --- a/src/platform/nrfconnect/wifi/ConnectivityManagerImplWiFi.cpp +++ b/src/platform/nrfconnect/wifi/ConnectivityManagerImplWiFi.cpp @@ -123,6 +123,26 @@ CHIP_ERROR ConnectivityManagerImplWiFi::_GetAndLogWiFiStatsCounters(void) return CHIP_NO_ERROR; } +#if CHIP_DEVICE_CONFIG_ENABLE_SED +CHIP_ERROR ConnectivityManagerImplWiFi::_GetSEDIntervalsConfig(ConnectivityManager::SEDIntervalsConfig & SEDIntervalsConfig) +{ + // For now Wi-Fi uses legacy power save mode that has fixed inactivity interval + SEDIntervalsConfig.ActiveIntervalMS = + chip::System::Clock::Milliseconds32(WiFiManager::kDefaultDTIMInterval * WiFiManager::kBeaconIntervalMs); + SEDIntervalsConfig.IdleIntervalMS = + chip::System::Clock::Milliseconds32(WiFiManager::kDefaultDTIMInterval * WiFiManager::kBeaconIntervalMs); + return CHIP_NO_ERROR; +} +CHIP_ERROR ConnectivityManagerImplWiFi::_SetSEDIntervalsConfig(const ConnectivityManager::SEDIntervalsConfig & intervalsConfig) +{ + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; +} +CHIP_ERROR ConnectivityManagerImplWiFi::_RequestSEDActiveMode(bool onOff, bool delayIdle) +{ + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; +} +#endif + ConnectivityManager::WiFiAPMode ConnectivityManagerImplWiFi::_GetWiFiAPMode(void) { /* AP mode is unsupported */ diff --git a/src/platform/nrfconnect/wifi/ConnectivityManagerImplWiFi.h b/src/platform/nrfconnect/wifi/ConnectivityManagerImplWiFi.h index dfa6a05f0b7ae4..407bb2044ed77c 100644 --- a/src/platform/nrfconnect/wifi/ConnectivityManagerImplWiFi.h +++ b/src/platform/nrfconnect/wifi/ConnectivityManagerImplWiFi.h @@ -55,6 +55,12 @@ class ConnectivityManagerImplWiFi void _OnWiFiScanDone(); void _OnWiFiStationProvisionChange(); +#if CHIP_DEVICE_CONFIG_ENABLE_SED + CHIP_ERROR _GetSEDIntervalsConfig(ConnectivityManager::SEDIntervalsConfig & intervalsConfig); + CHIP_ERROR _SetSEDIntervalsConfig(const ConnectivityManager::SEDIntervalsConfig & intervalsConfig); + CHIP_ERROR _RequestSEDActiveMode(bool onOff, bool delayIdle = false); +#endif + // Wi-Fi access point - not supported ConnectivityManager::WiFiAPMode _GetWiFiAPMode(void); CHIP_ERROR _SetWiFiAPMode(ConnectivityManager::WiFiAPMode val); diff --git a/src/platform/nrfconnect/wifi/WiFiManager.h b/src/platform/nrfconnect/wifi/WiFiManager.h index 920df4dd778597..99fd74f3cf8fb0 100644 --- a/src/platform/nrfconnect/wifi/WiFiManager.h +++ b/src/platform/nrfconnect/wifi/WiFiManager.h @@ -169,6 +169,11 @@ class WiFiManager static constexpr uint16_t kMaxInitialRouterSolicitationDelayMs = 1000; static constexpr uint8_t kRouterSolicitationMaxCount = 3; +#if CHIP_DEVICE_CONFIG_ENABLE_SED + static constexpr uint8_t kDefaultDTIMInterval = 3; + static constexpr uint8_t kBeaconIntervalMs = 100; +#endif + CHIP_ERROR Init(); CHIP_ERROR Scan(const ByteSpan & ssid, ScanResultCallback resultCallback, ScanDoneCallback doneCallback, bool internalScan = false); From 481a6fdb98adce2d6e243de1e78c4d2480089d61 Mon Sep 17 00:00:00 2001 From: Gaute Svanes Lunde Date: Tue, 17 Jan 2023 22:25:34 +0100 Subject: [PATCH 4/7] Add docbuild workflow for PRs (#24468) * workflows: add docbuild to PRs Added the docbuild workflow to PRs to inform contributors whether any changes will break the documentation build. Also limited the deploy step to only run on pushes to the master branch. Added the `--keep-going` flag to the Sphinx makefile to list all errors instead of stopping at the first one. Signed-off-by: Gaute Svanes Lunde * doc: Fix broken references Fixed some broken references to non-existing section "Running Pigweed RPC console" and the path to `docs/guides/silabs_efr32_software_update.md` Signed-off-by: Gaute Svanes Lunde Signed-off-by: Gaute Svanes Lunde --- .github/workflows/docbuild.yaml | 12 ++++++++++-- docs/Makefile | 2 +- .../light-switch-app/silabs/SiWx917/README.md | 16 ++-------------- examples/lock-app/silabs/SiWx917/README.md | 14 +------------- examples/window-app/silabs/SiWx917/README.md | 16 +--------------- 5 files changed, 15 insertions(+), 45 deletions(-) diff --git a/.github/workflows/docbuild.yaml b/.github/workflows/docbuild.yaml index 4e2d9bc22325e3..5e5db83f8f00dc 100644 --- a/.github/workflows/docbuild.yaml +++ b/.github/workflows/docbuild.yaml @@ -1,6 +1,14 @@ name: Documentation Build on: + pull_request: + types: [opened, synchronize, reopened] + branches: + - master + paths: + - '.github/workflows/docbuild.yaml' + - '**.md' + - 'docs/**' push: branches: - master @@ -9,7 +17,7 @@ permissions: contents: write jobs: - build-and-deploy: + build-and-publish: runs-on: ubuntu-latest steps: @@ -39,7 +47,7 @@ jobs: make html touch _build/html/.nojekyll - name: Deploy to gh-pages - if: github.repository == 'project-chip/connectedhomeip' + if: github.repository == 'project-chip/connectedhomeip' && github.event_name == 'push' && github.ref_name == 'master' uses: peaceiris/actions-gh-pages@v3 with: deploy_key: ${{ secrets.DOXYGEN_DEPLOY_KEY }} diff --git a/docs/Makefile b/docs/Makefile index 30826e465ad549..0d2d810e4769da 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -3,7 +3,7 @@ # You can set these variables from the command line, and also # from the environment for the first two. -SPHINXOPTS ?= -W -c . -d _build/doctrees +SPHINXOPTS ?= -W --keep-going -c . -d _build/doctrees SPHINXBUILD ?= sphinx-build SOURCEDIR = _build/src BUILDDIR = _build diff --git a/examples/light-switch-app/silabs/SiWx917/README.md b/examples/light-switch-app/silabs/SiWx917/README.md index 3a72765e663796..b08f29749e09cd 100644 --- a/examples/light-switch-app/silabs/SiWx917/README.md +++ b/examples/light-switch-app/silabs/SiWx917/README.md @@ -32,8 +32,6 @@ An example showing the use of CHIP on the Silicon Labs EFR32 MG12 and MG24. > release with added tools and documentation. > [Silabs Matter Github](https://github.com/SiliconLabs/matter/releases) - - ## Introduction The EFR32 light switch example provides a baseline demonstration of a on-off @@ -53,8 +51,6 @@ The light switch example is intended to serve both as a means to explore the workings of Matter as well as a template for creating real products based on the Silicon Labs platform. - - ## Building - Download the @@ -181,15 +177,13 @@ Silicon Labs platform. $ gn gen out/debug --args='import("//with_pw_rpc.gni")' $ ninja -C out/debug - [Running Pigweed RPC console](#running-pigweed-rpc-console) + [Running Pigweed RPC console](#running-rpc-console) For more build options, help is provided when running the build script without arguments ./scripts/examples/gn_efr32_example.sh - - ## Flashing the Application - On the command line: @@ -199,8 +193,6 @@ arguments - Or with the Ozone debugger, just load the .out file. - - ## Viewing Logging Output The example application is built to use the SEGGER Real Time Transfer (RTT) @@ -249,8 +241,6 @@ combination with JLinkRTTClient as follows: $ JLinkRTTClient - - ## Running the Complete Example - It is assumed here that you already have an OpenThread border router @@ -385,8 +375,6 @@ combination with JLinkRTTClient as follows: #Add Ipv6 route on PC(Linux) \$ sudo ip route add /64 via 2002::2 - - ## Running RPC console - As part of building the example with RPCs enabled the chip_rpc python @@ -432,7 +420,7 @@ tracking code inside the `trackAlloc` and `trackFree` function For the description of Software Update process with EFR32 example applications see -[EFR32 OTA Software Update](../../../docs/guides/silabs_efr32_software_update.md) +[EFR32 OTA Software Update](../../../../docs/guides/silabs_efr32_software_update.md) ## Building options diff --git a/examples/lock-app/silabs/SiWx917/README.md b/examples/lock-app/silabs/SiWx917/README.md index a681df76cc6d45..5944a5f8afe767 100644 --- a/examples/lock-app/silabs/SiWx917/README.md +++ b/examples/lock-app/silabs/SiWx917/README.md @@ -27,8 +27,6 @@ An example showing the use of CHIP on the Silicon Labs EFR32 MG12 and MG24. > release with added tools and documentation. > [Silabs Matter Github](https://github.com/SiliconLabs/matter/releases) - - ## Introduction The EFR32 lock example provides a baseline demonstration of a door lock control @@ -48,8 +46,6 @@ The lighting example is intended to serve both as a means to explore the workings of Matter as well as a template for creating real products based on the Silicon Labs platform. - - ## Building - Download the @@ -189,8 +185,6 @@ Mac OS X $ ninja -C out/debug ``` - [Running Pigweed RPC console](#running-pigweed-rpc-console) - For more build options, help is provided when running the build script without arguments @@ -198,8 +192,6 @@ arguments ./scripts/examples/gn_efr32_example.sh ``` - - ## Flashing the Application - On the command line: @@ -211,8 +203,6 @@ arguments - Or with the Ozone debugger, just load the .out file. - - ## Viewing Logging Output The example application is built to use the SEGGER Real Time Transfer (RTT) @@ -271,8 +261,6 @@ combination with JLinkRTTClient as follows: $ JLinkRTTClient ``` - - ## Running the Complete Example - It is assumed here that you already have an OpenThread border router @@ -413,7 +401,7 @@ tracking code inside the `trackAlloc` and `trackFree` function For the description of Software Update process with EFR32 example applications see -[EFR32 OTA Software Update](../../../docs/guides/silabs_efr32_software_update.md) +[EFR32 OTA Software Update](../../../../docs/guides/silabs_efr32_software_update.md) ## Building options diff --git a/examples/window-app/silabs/SiWx917/README.md b/examples/window-app/silabs/SiWx917/README.md index dda149285a8f91..58691ca93e857a 100644 --- a/examples/window-app/silabs/SiWx917/README.md +++ b/examples/window-app/silabs/SiWx917/README.md @@ -26,8 +26,6 @@ An example showing the use of CHIP on the Silicon Labs EFR32 MG12 and MG24. > release with added tools and documentation. > [Silabs Matter Github](https://github.com/SiliconLabs/matter/releases) - - ## Introduction The EFR32 window-covering example provides a baseline demonstration of a Window @@ -48,8 +46,6 @@ The window-covering example is intended to serve both as a means to explore the workings of Matter as well as a template for creating real products based on the Silicon Labs platform. - - ## Building - Download the @@ -145,15 +141,11 @@ Silicon Labs platform. $ gn gen out/debug --args='import("//with_pw_rpc.gni")' $ ninja -C out/debug - [Running Pigweed RPC console](#running-pigweed-rpc-console) - For more build options, help is provided when running the build script without arguments ./scripts/examples/gn_efr32_example.sh - - ## Flashing the Application - On the command line: @@ -163,8 +155,6 @@ arguments - Or with the Ozone debugger, just load the .out file. - - ## Viewing Logging Output The example application is built to use the SEGGER Real Time Transfer (RTT) @@ -213,8 +203,6 @@ combination with JLinkRTTClient as follows: $ JLinkRTTClient - - ## Running the Complete Example - It is assumed here that you already have an OpenThread border router @@ -344,13 +332,11 @@ combination with JLinkRTTClient as follows: # Add Ipv6 route on PC (Linux) $ sudo ip route add /64 via 2002::2 - - ## OTA Software Update For the description of Software Update process with EFR32 example applications see -[EFR32 OTA Software Update](../../../docs/guides/silabs_efr32_software_update.md) +[EFR32 OTA Software Update](../../../../docs/guides/silabs_efr32_software_update.md) ## Building options From 9486249d477f2031481d9264055eafba3a5adbb0 Mon Sep 17 00:00:00 2001 From: Vivien Nicolas Date: Tue, 17 Jan 2023 22:55:08 +0100 Subject: [PATCH 5/7] Fix some typos in src/app/tests/suites/TestLevelControlWithOnOffDependency.yaml (#24476) --- .../TestLevelControlWithOnOffDependency.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/app/tests/suites/TestLevelControlWithOnOffDependency.yaml b/src/app/tests/suites/TestLevelControlWithOnOffDependency.yaml index 69323b7c421564..c632a1302c9271 100644 --- a/src/app/tests/suites/TestLevelControlWithOnOffDependency.yaml +++ b/src/app/tests/suites/TestLevelControlWithOnOffDependency.yaml @@ -32,13 +32,13 @@ tests: command: "MoveToLevel" arguments: values: - - name: "level" + - name: "Level" value: 1 - - name: "transitionTime" + - name: "TransitionTime" value: 0 - - name: "optionsMask" + - name: "OptionsMask" value: 1 - - name: "optionsOverride" + - name: "OptionsOverride" value: 1 - label: "Wait 100 ms" @@ -155,13 +155,13 @@ tests: command: "MoveToLevel" arguments: values: - - name: "level" + - name: "Level" value: 127 - - name: "transitionTime" + - name: "TransitionTime" value: 0 - - name: "optionsMask" + - name: "OptionsMask" value: 1 - - name: "optionsOverride" + - name: "OptionsOverride" value: 1 - label: "Wait 100 ms" From 29517334e278c0d04897ebcb5c80cd8591c513ee Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 17 Jan 2023 16:55:35 -0500 Subject: [PATCH 6/7] Bump third_party/openthread/repo from `fd9f323` to `a1979fd` (#24437) Bumps [third_party/openthread/repo](https://github.com/openthread/openthread) from `fd9f323` to `a1979fd`. - [Release notes](https://github.com/openthread/openthread/releases) - [Commits](https://github.com/openthread/openthread/compare/fd9f3237eb525fff6cfe5a6af54fb0bdc0c86f72...a1979fdd8ed756468719cc4921b04a57efcf9f15) --- updated-dependencies: - dependency-name: third_party/openthread/repo dependency-type: direct:production ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- third_party/openthread/repo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third_party/openthread/repo b/third_party/openthread/repo index fd9f3237eb525f..a1979fdd8ed756 160000 --- a/third_party/openthread/repo +++ b/third_party/openthread/repo @@ -1 +1 @@ -Subproject commit fd9f3237eb525fff6cfe5a6af54fb0bdc0c86f72 +Subproject commit a1979fdd8ed756468719cc4921b04a57efcf9f15 From 808b9fe8b20e80b59edb2ede502a2eea8320e39d Mon Sep 17 00:00:00 2001 From: Yufeng Wang Date: Tue, 17 Jan 2023 14:31:28 -0800 Subject: [PATCH 7/7] Remove obsolate remote builder for code coverage (#24451) --- docs/guides/BUILDING.md | 31 ++++++++ integrations/docker/images/build-all.sh | 2 +- .../chip-build-remote-builder/Dockerfile | 4 -- .../chip-build-remote-builder/README.md | 24 ------- .../images/chip-build-remote-builder/build.sh | 23 ------ .../chip-build-remote-builder/cloudbuild.yaml | 6 -- .../images/chip-build-remote-builder/run.sh | 70 ------------------- 7 files changed, 32 insertions(+), 128 deletions(-) delete mode 100644 integrations/docker/images/chip-build-remote-builder/Dockerfile delete mode 100644 integrations/docker/images/chip-build-remote-builder/README.md delete mode 100755 integrations/docker/images/chip-build-remote-builder/build.sh delete mode 100644 integrations/docker/images/chip-build-remote-builder/cloudbuild.yaml delete mode 100755 integrations/docker/images/chip-build-remote-builder/run.sh diff --git a/docs/guides/BUILDING.md b/docs/guides/BUILDING.md index 852367ae18df94..ea0f235c04ec9f 100644 --- a/docs/guides/BUILDING.md +++ b/docs/guides/BUILDING.md @@ -390,6 +390,37 @@ gn desc out/host //src/lib outputs gn desc out/host //src/lib --format=json ``` +## Coverage + +Code coverage scripts generate a report that details how much of the Matter SDK +source code has been executed, it also gives information on how often the Matter +SDK executes segments of code and produces a copy of the source file, annotated +with execution frequencies. + +``` +./scripts/build_coverage.sh +``` + +By default, Code coverage is performed at the unit testing level. Unit tests are +created by developers, thus giving them the best vantage from which to decide +what tests to include in unit testing. But you can extend the coverage test by +scope and ways of execution with the following parameters: + +``` + -c, --code Specify which scope to collect coverage data. + 'core': collect coverage data from core stack in Matter SDK. --default + 'clusters': collect coverage data from clusters implementation in Matter SDK. + 'all': collect coverage data from Matter SDK. + -t, --tests Specify which tools to run the coverage check. + 'unit': Run unit test to drive the coverage check. --default + 'yaml': Run yaml test to drive the coverage check. + 'all': Run unit & yaml test to drive the coverage check. +``` + +Also see the up-to-date unit testing coverage report of the Matter SDK +(collected daily) at: +[matter coverage](https://matter-build-automation.ue.r.appspot.com). + ## Maintaining Matter If you make any change to the GN build system, the next build will regenerate diff --git a/integrations/docker/images/build-all.sh b/integrations/docker/images/build-all.sh index e2b942b0887a9f..4aff2747ed571a 100755 --- a/integrations/docker/images/build-all.sh +++ b/integrations/docker/images/build-all.sh @@ -21,7 +21,7 @@ # https://github.com/project-chip/connectedhomeip/issues/710 # set -e -find "$(git rev-parse --show-toplevel)"/integrations/docker/images/ -name Dockerfile ! -path "*chip-cert-bins/*" ! -path "*chip-build-remote-builder/*" | while read -r dockerfile; do +find "$(git rev-parse --show-toplevel)"/integrations/docker/images/ -name Dockerfile ! -path "*chip-cert-bins/*" | while read -r dockerfile; do pushd "$(dirname "$dockerfile")" >/dev/null ./build.sh "$@" popd >/dev/null diff --git a/integrations/docker/images/chip-build-remote-builder/Dockerfile b/integrations/docker/images/chip-build-remote-builder/Dockerfile deleted file mode 100644 index ebb6072113a3e6..00000000000000 --- a/integrations/docker/images/chip-build-remote-builder/Dockerfile +++ /dev/null @@ -1,4 +0,0 @@ -FROM google/cloud-sdk - -COPY run.sh /bin -CMD ["bash", "-xe", "/bin/run.sh"] diff --git a/integrations/docker/images/chip-build-remote-builder/README.md b/integrations/docker/images/chip-build-remote-builder/README.md deleted file mode 100644 index 6c6e72ccd8221b..00000000000000 --- a/integrations/docker/images/chip-build-remote-builder/README.md +++ /dev/null @@ -1,24 +0,0 @@ -# Docker `gcr.io:\$PROJECT_ID:remote-builder` - -`gcr.io:\$PROJECT_ID:remote-builder` is the name of the Docker image used by -Matter for continuous integration and coverage statistics using Google Cloud -Platform. - -Contents of this directory: - -- build.sh - utility for building (and optionally) tagging and pushing the - remote-builder Docker image -- cloudbuild.yaml - build config file contains instructions for Cloud Build to - build, package, and push the remote-builder Docker image. -- Dockerfile - description of the image - -In order to use remote-builder, you need to first build the builder: - -`./build.sh` - -When using the remote-builder image, the following will happen: - -1. A temporary SSH key will be created in your Container Builder workspace -2. SSH into a virtual machine instance with your configured flags -3. Your command will be run inside that compute engine instance's workspace -4. The workspace will be copied back to your Container Builder workspace diff --git a/integrations/docker/images/chip-build-remote-builder/build.sh b/integrations/docker/images/chip-build-remote-builder/build.sh deleted file mode 100755 index 7e33a953862ce8..00000000000000 --- a/integrations/docker/images/chip-build-remote-builder/build.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env bash - -# -# Copyright (c) 2022 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# build.sh - utility for building (and optionally) tagging and pushing -# the a Docker image -# - -gcloud builds submit --config=cloudbuild.yaml . diff --git a/integrations/docker/images/chip-build-remote-builder/cloudbuild.yaml b/integrations/docker/images/chip-build-remote-builder/cloudbuild.yaml deleted file mode 100644 index 23ca7f79627862..00000000000000 --- a/integrations/docker/images/chip-build-remote-builder/cloudbuild.yaml +++ /dev/null @@ -1,6 +0,0 @@ -steps: - - name: "gcr.io/cloud-builders/docker" - args: ["build", "-t", "gcr.io/$PROJECT_ID/remote-builder", "."] -images: - - "gcr.io/$PROJECT_ID/remote-builder" -tags: ["cloud-builders-community"] diff --git a/integrations/docker/images/chip-build-remote-builder/run.sh b/integrations/docker/images/chip-build-remote-builder/run.sh deleted file mode 100755 index dd1a173d4e389e..00000000000000 --- a/integrations/docker/images/chip-build-remote-builder/run.sh +++ /dev/null @@ -1,70 +0,0 @@ -#!/bin/bash -xe - -# -# Copyright (c) 2022 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# run.sh - utility for running a Docker image -# -# This script expects to live in a directory named after the image -# with a version file next to it. So: use symlinks -# -USERNAME=${USERNAME:-ubuntu} -PROJECT=$(gcloud info --format='value(config.project)') -INSTANCE_NAME=${INSTANCE_NAME:-matter-remote-builder} -ZONE=${ZONE:-us-central1-c} -GCLOUD=${GCLOUD:-gcloud} -RETRIES=${RETRIES:-3} - -# Run command on the instance via ssh -function ssh() { - "$GCLOUD" compute ssh --project="$PROJECT" --zone="$ZONE" "$USERNAME@$INSTANCE_NAME" -- "$1" -} - -# Always delete workspace after attempting build -function cleanup() { - ssh "$CLEANUP_CMD" -} - -"$GCLOUD" config set project "$PROJECT_ID" -"$GCLOUD" config set compute/zone "$ZONE" - -trap cleanup EXIT - -RETRY_COUNT=1 -while [ "$(ssh 'printf pass')" != "pass" ]; do - echo "[Try $RETRY_COUNT of $RETRIES] Waiting for instance to start accepting SSH connections..." - if [ "$RETRY_COUNT" == "$RETRIES" ]; then - echo "Retry limit reached, giving up!" - exit 1 - fi - sleep 10 - RETRY_COUNT=$(($RETRY_COUNT + 1)) -done - -# Cleanup workspace if there is leftover -ssh "$CLEANUP_CMD" - -# Setup workspace with connectedhomeip -ssh "$GIT_CLONE_CMD" - -# Run coverage tests -ssh "$RUN_COVERAGE_CMD" - -"$GCLOUD" compute scp --project="$PROJECT" --zone="$ZONE" \ - "$USERNAME@$INSTANCE_NAME:/home/ubuntu/connectedhomeip/out/coverage/coverage/coverage_html.tar.gz" "$PWD" - -# Always delete workspace after build -ssh "$CLEANUP_CMD"