Skip to content

Commit

Permalink
Merge branch 'master' into MdnsDiscovery-PythonTests
Browse files Browse the repository at this point in the history
  • Loading branch information
raul-marquez-csa authored Feb 1, 2024
2 parents 2422cc2 + a77e01c commit a75410f
Show file tree
Hide file tree
Showing 27 changed files with 112 additions and 85 deletions.
42 changes: 21 additions & 21 deletions .github/workflows/tests.yaml

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import("//build_overrides/build.gni")
import("//build_overrides/chip.gni")
import("//build_overrides/mbedtls.gni")
import("//build_overrides/nlassert.gni")
import("//build_overrides/nlio.gni")
import("//build_overrides/nlunit_test.gni")
import("//build_overrides/pigweed.gni")

Expand Down Expand Up @@ -136,7 +135,6 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") {
"${chip_root}/src/system",
"${chip_root}/src/transport",
"${nlassert_root}:nlassert",
"${nlio_root}:nlio",
"${nlunit_test_root}:nlunit-test",
]

Expand Down
3 changes: 0 additions & 3 deletions src/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,6 @@ config("includes") {
include_dirs += [ "${chip_external_platform_include_dir}" ]
}

# TODO: generated file dependency should be a lib NOT an include
include_dirs += [ "${chip_root}/zzz_generated/app-common" ]

defines = [ "CHIP_HAVE_CONFIG_H=1" ]

# Make __FILE__ and related macros relative to chip_root
Expand Down
16 changes: 1 addition & 15 deletions src/app/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -104,20 +104,6 @@ source_set("global-attributes") {
]
}

source_set("pre-encoded-value") {
sources = [
"data-model/FabricScopedPreEncodedValue.cpp",
"data-model/FabricScopedPreEncodedValue.h",
"data-model/PreEncodedValue.cpp",
"data-model/PreEncodedValue.h",
]

deps = [
"${chip_root}/src/lib/core",
"${chip_root}/src/lib/support",
]
}

source_set("subscription-manager") {
sources = [ "SubscriptionsInfoProvider.h" ]

Expand Down Expand Up @@ -335,8 +321,8 @@ static_library("app") {
":app_config",
":global-attributes",
":interaction-model",
":pre-encoded-value",
":revision_info",
"${chip_root}/src/app/data-model",
"${chip_root}/src/app/icd/server:icd-server-config",
"${chip_root}/src/lib/address_resolve",
"${chip_root}/src/lib/support",
Expand Down
1 change: 1 addition & 0 deletions src/app/chip_data_model.gni
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,7 @@ template("chip_data_model") {
":${_data_model_name}_zapgen",
"${chip_root}/src/app",
"${chip_root}/src/app/common:cluster-objects",
"${chip_root}/src/app/common:enums",
"${chip_root}/src/controller",
"${chip_root}/src/lib/core",
"${chip_root}/src/lib/support",
Expand Down
26 changes: 23 additions & 3 deletions src/app/common/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,41 @@

import("//build_overrides/chip.gni")

config("includes") {
include_dirs = [ "${chip_root}/zzz_generated/app-common" ]
}

static_library("cluster-objects") {
output_name = "libClusterObjects"

sources = [
"${chip_root}/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h",
"${chip_root}/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h",
"${chip_root}/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp",
"${chip_root}/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h",
]

public_deps = [
"${chip_root}/src/app/data-model",
"${chip_root}/src/lib/core",
"${chip_root}/src/lib/support",
"${chip_root}/src/protocols/interaction_model",
]

defines = []
public_configs = [ ":includes" ]
}

source_set("enums") {
sources = [
"${chip_root}/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h",
"${chip_root}/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h",
]

public_configs = [ ":includes" ]
}

source_set("simulated") {
sources = [ "${chip_root}/zzz_generated/app-common/app-common/zap-generated/tests/simulated-cluster-objects.h" ]

public_deps = [ ":enums" ]

public_configs = [ ":includes" ]
}
47 changes: 47 additions & 0 deletions src/app/data-model/BUILD.gn
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Copyright (c) 2024 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.
import("//build_overrides/chip.gni")

source_set("data-model") {
sources = [
"BasicTypes.h",
"DecodableList.h",
"Decode.h",
"Encode.h",
"FabricScoped.h",
"FabricScopedPreEncodedValue.cpp",
"FabricScopedPreEncodedValue.h",
"List.h",
"NullObject.h",
"Nullable.h",
"PreEncodedValue.cpp",
"PreEncodedValue.h",
"TagBoundEncoder.h",
"WrappedStructEncoder.h",
]

deps = [
# TODO: dependencies NOT declared because they are not part of
# any GN dependency. Overall src/app seems to suffer greatly
# of this, in part due to zap-generated code dependency.
#
# - app/util/attribute-storage-null-handling.h
# - app/ConcreteAttributePath.h
#
"${chip_root}/src/app/common:enums",
"${chip_root}/src/lib/core",
"${chip_root}/src/lib/support",
"${chip_root}/src/protocols/interaction_model",
]
}
1 change: 1 addition & 0 deletions src/app/tests/suites/commands/delay/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ static_library("delay") {
cflags = [ "-Wconversion" ]

public_deps = [
"${chip_root}/src/app/common:simulated",
"${chip_root}/src/lib/support",
"${chip_root}/src/platform",
"${chip_root}/src/system",
Expand Down
1 change: 1 addition & 0 deletions src/app/tests/suites/commands/discovery/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ static_library("discovery") {

public_deps = [
"${chip_root}/src/app",
"${chip_root}/src/app/common:simulated",
"${chip_root}/src/lib/address_resolve",
"${chip_root}/src/lib/support",
]
Expand Down
5 changes: 4 additions & 1 deletion src/app/tests/suites/commands/log/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,8 @@ static_library("log") {

cflags = [ "-Wconversion" ]

public_deps = [ "${chip_root}/src/lib/support" ]
public_deps = [
"${chip_root}/src/app/common:simulated",
"${chip_root}/src/lib/support",
]
}
5 changes: 4 additions & 1 deletion src/app/tests/suites/commands/system/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,8 @@ static_library("system") {

cflags = [ "-Wconversion" ]

public_deps = [ "${chip_root}/src/lib/support" ]
public_deps = [
"${chip_root}/src/app/common:simulated",
"${chip_root}/src/lib/support",
]
}
2 changes: 0 additions & 2 deletions src/inet/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import("//build_overrides/build.gni")
import("//build_overrides/chip.gni")
import("//build_overrides/nlassert.gni")
import("//build_overrides/nlfaultinjection.gni")
import("//build_overrides/nlio.gni")

import("${chip_root}/build/chip/buildconfig_header.gni")
import("${chip_root}/build/chip/tests.gni")
Expand Down Expand Up @@ -104,7 +103,6 @@ static_library("inet") {
"${chip_root}/src/lib/support",
"${chip_root}/src/platform:platform_config_header",
"${chip_root}/src/system",
"${nlio_root}:nlio",
]

if (chip_system_config_use_lwip) {
Expand Down
12 changes: 6 additions & 6 deletions src/lib/core/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,11 @@ source_set("error") {
]
}

source_set("encoding") {
sources = [ "CHIPEncoding.h" ]
public_deps = [ "${nlio_root}:nlio" ]
}

source_set("types") {
sources = [
"CHIPSafeCasts.h",
Expand All @@ -125,14 +130,9 @@ static_library("core") {
output_name = "libChipCore"

sources = [
# For now cluster enum/bitmap definitions are in zzz-generated.
# We should consider putting them directly in this directory
# instead.
"${chip_root}/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h",
"CASEAuthTag.h",
"CHIPCallback.h",
"CHIPCore.h",
"CHIPEncoding.h",
"CHIPKeyIds.cpp",
"CHIPKeyIds.h",
"CHIPPersistentStorageDelegate.h",
Expand Down Expand Up @@ -171,11 +171,11 @@ static_library("core") {
public_deps = [
":chip_config_header",
":error",
"${chip_root}/src/app/common:enums",
"${chip_root}/src/ble",
"${chip_root}/src/inet",
"${chip_root}/src/lib/support",
"${chip_root}/src/system",
"${nlio_root}:nlio",
]

allow_circular_includes_from = [
Expand Down
3 changes: 1 addition & 2 deletions src/lib/support/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import("//build_overrides/build.gni")
import("//build_overrides/chip.gni")
import("//build_overrides/nlassert.gni")
import("//build_overrides/nlfaultinjection.gni")
import("//build_overrides/nlio.gni")
import("//build_overrides/nlunit_test.gni")
import("//build_overrides/pigweed.gni")

Expand Down Expand Up @@ -256,12 +255,12 @@ static_library("support") {
":verifymacros",
":verifymacros_no_logging",
"${chip_root}/src/lib/core:chip_config_header",
"${chip_root}/src/lib/core:encoding",
"${chip_root}/src/lib/core:error",
"${chip_root}/src/lib/core:types",
"${chip_root}/src/platform:platform_config_header",
"${chip_root}/src/system:system_config_header",
"${nlassert_root}:nlassert",
"${nlio_root}:nlio",
]

# These are needed because we include CHIPCore.h, which uses config
Expand Down
3 changes: 0 additions & 3 deletions src/messaging/tests/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

import("//build_overrides/build.gni")
import("//build_overrides/chip.gni")
import("//build_overrides/nlio.gni")
import("//build_overrides/nlunit_test.gni")

import("${chip_root}/build/chip/chip_test_suite.gni")
Expand All @@ -37,7 +36,6 @@ static_library("helpers") {
"${chip_root}/src/protocols",
"${chip_root}/src/transport",
"${chip_root}/src/transport/tests:helpers",
"${nlio_root}:nlio",
]
}

Expand Down Expand Up @@ -78,7 +76,6 @@ chip_test_suite_using_nltest("tests") {
"${chip_root}/src/protocols",
"${chip_root}/src/transport",
"${chip_root}/src/transport/raw/tests:helpers",
"${nlio_root}:nlio",
"${nlunit_test_root}:nlunit-test",
]

Expand Down
1 change: 0 additions & 1 deletion src/platform/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

import("//build_overrides/build.gni")
import("//build_overrides/chip.gni")
import("//build_overrides/nlio.gni")
import("//build_overrides/pigweed.gni")

import("${build_root}/config/linux/pkg_config.gni")
Expand Down
4 changes: 0 additions & 4 deletions src/platform/Linux/ThreadStackManagerImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@

#include <app-common/zap-generated/ids/Attributes.h>

#include <nlbyteorder.hpp>
#include <nlio-byteorder.hpp>
#include <nlio.hpp>

using namespace ::chip::app;
using namespace ::chip::app::Clusters;
using namespace chip::DeviceLayer::NetworkCommissioning;
Expand Down
4 changes: 0 additions & 4 deletions src/platform/webos/ThreadStackManagerImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@

#include <app-common/zap-generated/ids/Attributes.h>

#include <nlbyteorder.hpp>
#include <nlio-byteorder.hpp>
#include <nlio.hpp>

using namespace ::chip::app;
using namespace ::chip::app::Clusters;
using namespace chip::DeviceLayer::NetworkCommissioning;
Expand Down
2 changes: 0 additions & 2 deletions src/protocols/bdx/tests/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

import("//build_overrides/build.gni")
import("//build_overrides/chip.gni")
import("//build_overrides/nlio.gni")
import("//build_overrides/nlunit_test.gni")

import("${chip_root}/build/chip/chip_test_suite.gni")
Expand All @@ -33,7 +32,6 @@ chip_test_suite_using_nltest("tests") {
"${chip_root}/src/lib/support",
"${chip_root}/src/lib/support:testing_nlunit",
"${chip_root}/src/protocols/bdx",
"${nlio_root}:nlio",
"${nlunit_test_root}:nlunit-test",
]

Expand Down
2 changes: 0 additions & 2 deletions src/protocols/secure_channel/tests/BUILD.gn
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import("//build_overrides/build.gni")
import("//build_overrides/chip.gni")
import("//build_overrides/nlio.gni")
import("//build_overrides/nlunit_test.gni")
import("${chip_root}/build/chip/chip_test_suite.gni")
import("${chip_root}/src/app/icd/icd.gni")
Expand Down Expand Up @@ -35,7 +34,6 @@ chip_test_suite_using_nltest("tests") {
"${chip_root}/src/protocols",
"${chip_root}/src/protocols/secure_channel",
"${chip_root}/src/transport/raw/tests:helpers",
"${nlio_root}:nlio",
"${nlunit_test_root}:nlunit-test",
]

Expand Down
2 changes: 0 additions & 2 deletions src/protocols/user_directed_commissioning/tests/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

import("//build_overrides/build.gni")
import("//build_overrides/chip.gni")
import("//build_overrides/nlio.gni")
import("//build_overrides/nlunit_test.gni")

import("${chip_root}/build/chip/chip_test_suite.gni")
Expand All @@ -27,7 +26,6 @@ chip_test_suite_using_nltest("tests") {
"${chip_root}/src/lib/support",
"${chip_root}/src/lib/support:testing_nlunit",
"${chip_root}/src/protocols",
"${nlio_root}:nlio",
"${nlunit_test_root}:nlunit-test",
]

Expand Down
2 changes: 0 additions & 2 deletions src/transport/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
# limitations under the License.

import("//build_overrides/chip.gni")
import("//build_overrides/nlio.gni")
import("//build_overrides/pigweed.gni")
import("${chip_root}/src/ble/ble.gni")
import("${chip_root}/src/lib/core/core.gni")
Expand Down Expand Up @@ -68,7 +67,6 @@ static_library("transport") {
"${chip_root}/src/tracing",
"${chip_root}/src/tracing:macros",
"${chip_root}/src/transport/raw",
"${nlio_root}:nlio",
]

if (chip_enable_transport_trace) {
Expand Down
Loading

0 comments on commit a75410f

Please sign in to comment.