Skip to content

Commit f1e0f75

Browse files
authored
Merge branch 'master' into feature/basic-app-install-flow
2 parents 6a6dc09 + b5d13a7 commit f1e0f75

17 files changed

+1065
-1395
lines changed

.gn

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ script_executable = "python3"
2525

2626
default_args = {
2727
pw_unit_test_AUTOMATIC_RUNNER = "$dir_pigweed/targets/host/run_test"
28+
pw_unit_test_CONFIG = "//config/pw_unit_test:define_overrides"
2829

2930
pw_build_PIP_CONSTRAINTS = [ "//scripts/setup/constraints.txt" ]
3031
pw_build_PIP_REQUIREMENTS = [ "//scripts/setup/requirements.build.txt" ]

config/pw_unit_test/BUILD.gn

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Copyright (c) 2024 Project CHIP Authors
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
import("//build_overrides/build.gni")
16+
import("//build_overrides/chip.gni")
17+
import("//build_overrides/pigweed.gni")
18+
19+
import("${chip_root}/build/chip/tests.gni")
20+
21+
import("$dir_pw_build/target_types.gni")
22+
pw_source_set("define_overrides") {
23+
public_configs = [ ":define_options" ]
24+
}
25+
26+
config("define_options") {
27+
if (chip_fake_platform && chip_link_tests) {
28+
defines = [ "PW_UNIT_TEST_CONFIG_MEMORY_POOL_SIZE=65536" ]
29+
} else {
30+
defines = [ "PW_UNIT_TEST_CONFIG_MEMORY_POOL_SIZE=16384" ]
31+
}
32+
}

examples/all-clusters-app/all-clusters-common/all-clusters-app.matter

+2-2
Original file line numberDiff line numberDiff line change
@@ -3752,7 +3752,7 @@ cluster ActivatedCarbonFilterMonitoring = 114 {
37523752
}
37533753

37543754
/** This cluster is used to configure a boolean sensor. */
3755-
provisional cluster BooleanStateConfiguration = 128 {
3755+
cluster BooleanStateConfiguration = 128 {
37563756
revision 1;
37573757

37583758
bitmap AlarmModeBitmap : bitmap8 {
@@ -3810,7 +3810,7 @@ provisional cluster BooleanStateConfiguration = 128 {
38103810
}
38113811

38123812
/** This cluster is used to configure a valve. */
3813-
provisional cluster ValveConfigurationAndControl = 129 {
3813+
cluster ValveConfigurationAndControl = 129 {
38143814
revision 1;
38153815

38163816
enum StatusCodeEnum : enum8 {

src/app/zap-templates/zcl/data-model/chip/boolean-state-configuration-cluster.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ limitations under the License.
2828
<field name="GeneralFault" mask="0x1"/>
2929
</bitmap>
3030

31-
<cluster apiMaturity="provisional">
31+
<cluster>
3232
<domain>General</domain>
3333
<name>Boolean State Configuration</name>
3434
<code>0x0080</code>

src/app/zap-templates/zcl/data-model/chip/valve-configuration-and-control-cluster.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ limitations under the License.
4040
<item name="FailureDueToFault" value="0x02"/>
4141
</enum>
4242

43-
<cluster apiMaturity="provisional">
43+
<cluster>
4444
<domain>HVAC</domain>
4545
<name>Valve Configuration and Control</name>
4646
<code>0x0081</code>

src/controller/data_model/controller-clusters.matter

+2-2
Original file line numberDiff line numberDiff line change
@@ -3988,7 +3988,7 @@ cluster ActivatedCarbonFilterMonitoring = 114 {
39883988
}
39893989

39903990
/** This cluster is used to configure a boolean sensor. */
3991-
provisional cluster BooleanStateConfiguration = 128 {
3991+
cluster BooleanStateConfiguration = 128 {
39923992
revision 1;
39933993

39943994
bitmap AlarmModeBitmap : bitmap8 {
@@ -4046,7 +4046,7 @@ provisional cluster BooleanStateConfiguration = 128 {
40464046
}
40474047

40484048
/** This cluster is used to configure a valve. */
4049-
provisional cluster ValveConfigurationAndControl = 129 {
4049+
cluster ValveConfigurationAndControl = 129 {
40504050
revision 1;
40514051

40524052
enum StatusCodeEnum : enum8 {

src/messaging/tests/BUILD.gn

+1-10
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515
import("//build_overrides/build.gni")
1616
import("//build_overrides/chip.gni")
17-
import("//build_overrides/nlunit_test.gni")
1817

1918
import("${chip_root}/build/chip/chip_test_suite.gni")
2019
import("${chip_root}/src/app/icd/icd.gni")
@@ -38,15 +37,9 @@ static_library("helpers") {
3837
"${chip_root}/src/transport",
3938
"${chip_root}/src/transport/tests:helpers",
4039
]
41-
42-
# MessagingContext exposes nl-test compatible setup/teardown functions, specifically
43-
# they return nltest specific SUCCESS/FAILURE constants hence this dependency.
44-
#
45-
# Once all tests are moved to pw_unittest/gtest, this dependency should be removed
46-
public_deps = [ "${nlunit_test_root}:nlunit-test" ]
4740
}
4841

49-
chip_test_suite_using_nltest("tests") {
42+
chip_test_suite("tests") {
5043
output_name = "libMessagingLayerTests"
5144

5245
test_sources = [
@@ -73,12 +66,10 @@ chip_test_suite_using_nltest("tests") {
7366
"${chip_root}/src/lib/core",
7467
"${chip_root}/src/lib/support",
7568
"${chip_root}/src/lib/support:test_utils",
76-
"${chip_root}/src/lib/support:testing_nlunit",
7769
"${chip_root}/src/messaging",
7870
"${chip_root}/src/protocols",
7971
"${chip_root}/src/transport",
8072
"${chip_root}/src/transport/raw/tests:helpers",
81-
"${nlunit_test_root}:nlunit-test",
8273
]
8374

8475
if (chip_enable_icd_server) {

src/messaging/tests/MessagingContext.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@
3232
#include <transport/tests/LoopbackTransportManager.h>
3333
#include <transport/tests/UDPTransportManager.h>
3434

35-
#include <nlunit-test.h>
36-
3735
#include <vector>
3836

3937
namespace chip {
@@ -98,6 +96,8 @@ class MessagingContext : public PlatformMemoryUser
9896
mInitialized(false), mAliceAddress(Transport::PeerAddress::UDP(GetAddress(), CHIP_PORT + 1)),
9997
mBobAddress(Transport::PeerAddress::UDP(GetAddress(), CHIP_PORT))
10098
{}
99+
// TODO Replace VerifyOrDie with Pigweed assert after transition app/tests to Pigweed.
100+
// TODO Currently src/app/icd/server/tests is using MessagingConetext as dependency.
101101
~MessagingContext() { VerifyOrDie(mInitialized == false); }
102102

103103
// Whether Alice and Bob are initialized, must be called before Init

0 commit comments

Comments
 (0)