Skip to content

Commit 4c4d8bf

Browse files
authored
[darwin-framework-tool] Remove codegen tests (#31942)
1 parent f4da03c commit 4c4d8bf

File tree

14 files changed

+53
-194409
lines changed

14 files changed

+53
-194409
lines changed

examples/darwin-framework-tool/BUILD.gn

+43-69
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,13 @@ assert(chip_build_tools)
3030
declare_args() {
3131
chip_codesign = current_os == "ios"
3232

33-
# When config_enable_yaml_tests is false, the Matter SDK options are not available.
34-
if (!config_enable_yaml_tests) {
35-
chip_inet_config_enable_ipv4 = true
36-
if (!defined(chip_config_network_layer_ble)) {
37-
chip_config_network_layer_ble = true
38-
}
39-
if (!defined(is_clang)) {
40-
is_clang = false
41-
}
33+
chip_inet_config_enable_ipv4 = true
34+
35+
if (!defined(chip_config_network_layer_ble)) {
36+
chip_config_network_layer_ble = true
37+
}
38+
if (!defined(is_clang)) {
39+
is_clang = false
4240
}
4341

4442
enable_provisional_features = config_enable_yaml_tests
@@ -125,12 +123,17 @@ action("build-darwin-framework") {
125123
output_name = "Matter.framework"
126124
outputs = [
127125
"${root_out_dir}/macos_framework_output/Build/Products/${output_sdk_type}/${output_name}",
126+
"${root_out_dir}/macos_framework_output/Build/Intermediates.noindex/Matter.build/${output_sdk_type}/Matter.build/out/gen/include",
128127
"${root_build_dir}/darwin_framework_build.log",
129128
"${root_out_dir}/macos_framework_output/ModuleCache.noindex/",
130129
"${root_out_dir}/macos_framework_output/Logs",
131130
"${root_out_dir}/macos_framework_output/Index",
132131
"${root_out_dir}/macos_framework_output/Build",
133132
]
133+
134+
if (sdk == "macosx") {
135+
outputs += [ "${root_out_dir}/macos_framework_output/Build/Intermediates.noindex/Matter.build/${output_sdk_type}/Matter.build/out/lib/libCHIP.a" ]
136+
}
134137
}
135138

136139
config("config") {
@@ -150,7 +153,7 @@ config("config") {
150153
]
151154

152155
defines = [
153-
"CONFIG_ENABLE_YAML_TESTS=${config_enable_yaml_tests}",
156+
"CHIP_ADDRESS_RESOLVE_IMPL_INCLUDE_HEADER=<lib/address_resolve/AddressResolve_DefaultImpl.h>",
154157
"CONFIG_USE_INTERACTIVE_MODE=${config_use_interactive_mode}",
155158

156159
# Disable availability annotations in Matter.framework headers because we
@@ -171,6 +174,8 @@ executable("darwin-framework-tool") {
171174
"${chip_root}/examples/chip-tool/commands/common/Commands.cpp",
172175
"${chip_root}/examples/chip-tool/commands/common/Commands.h",
173176
"${chip_root}/examples/chip-tool/commands/common/HexConversion.h",
177+
"${chip_root}/examples/common/websocket-server/WebSocketServer.cpp",
178+
"${chip_root}/examples/common/websocket-server/WebSocketServer.h",
174179
"${chip_root}/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp",
175180
"commands/bdx/Commands.h",
176181
"commands/bdx/DownloadLogCommand.mm",
@@ -214,17 +219,14 @@ executable("darwin-framework-tool") {
214219

215220
deps = [
216221
":build-darwin-framework",
222+
"${chip_root}/third_party/libwebsockets",
217223
jsoncpp_root,
218224
]
219225

220226
if (config_use_interactive_mode) {
221227
sources += [ "commands/interactive/InteractiveCommands.mm" ]
222228

223-
deps += [
224-
"${chip_root}/examples/common/websocket-server",
225-
"${chip_root}/src/platform/logging:headers",
226-
"${editline_root}:editline",
227-
]
229+
deps += [ "${editline_root}:editline" ]
228230
}
229231

230232
ldflags = [
@@ -237,63 +239,35 @@ executable("darwin-framework-tool") {
237239
"Security.framework",
238240
]
239241

240-
# When config_enable_yaml_tests=true the Matter SDK is pulled in as a dependency because the code of the test suite
241-
# uses some helpers from the Matter SDK. As a result, the SDK is built twice. Once because of this dependency and once
242-
# when the Matter.framework is built.
243-
# It may results in different versions of the Matter SDK between the output binary and the linked Matter.framework.
244-
#
245-
# When config_enable_yaml_tests=false the Matter SDK is built once when the Matter.framework is built and the resulting
246-
# libCHIP.a library is linked statically to the output binary.
247-
if (config_enable_yaml_tests) {
248-
deps += [
249-
"${chip_root}/src/app/tests/suites/commands/delay",
250-
251-
# IM is needed for MTRError
252-
"${chip_root}/src/app/tests/suites/commands/interaction_model",
253-
254-
# Log is needed by tests UserPrompt and Log
255-
"${chip_root}/src/app/tests/suites/commands/log",
256-
257-
# System is needed by tests FactoryReset etc..
258-
"${chip_root}/src/app/tests/suites/commands/system",
259-
260-
# pics is needed by tests
261-
"${chip_root}/src/app/tests/suites/pics",
262-
"${chip_root}/src/protocols/interaction_model",
263-
]
264-
265-
defines = []
266-
} else {
267-
include_dirs = [
268-
"${chip_root}/config/standalone/",
269-
"${chip_root}/src/",
270-
"${chip_root}/src/include/",
271-
"${chip_root}/src/protocols/",
272-
"${chip_root}/src/protocols/interaction_model",
273-
"${chip_root}/third_party/nlassert/repo/include/",
274-
"${chip_root}/third_party/nlio/repo/include/",
275-
"${chip_root}/zzz_generated/app-common/",
276-
"${root_gen_dir}/include",
277-
"${root_out_dir}/macos_framework_output/Build/Intermediates.noindex/Matter.build/${output_sdk_type}/Matter.build/out/gen/include",
278-
]
242+
include_dirs = [
243+
"${chip_root}/config/standalone/",
244+
"${chip_root}/src/",
245+
"${chip_root}/src/include/",
246+
"${chip_root}/src/protocols/",
247+
"${chip_root}/src/protocols/interaction_model",
248+
"${chip_root}/third_party/nlassert/repo/include/",
249+
"${chip_root}/third_party/nlio/repo/include/",
250+
"${chip_root}/zzz_generated/app-common/",
251+
"${root_gen_dir}/include",
252+
"${root_out_dir}/macos_framework_output/Build/Intermediates.noindex/Matter.build/${output_sdk_type}/Matter.build/out/gen/include",
253+
]
279254

280-
defines = [
281-
"CHIP_HAVE_CONFIG_H=1",
282-
"CHIP_SYSTEM_CONFIG_USE_SOCKETS=1",
283-
]
255+
defines = [
256+
"CHIP_HAVE_CONFIG_H=1",
257+
"CHIP_SYSTEM_CONFIG_USE_SOCKETS=1",
258+
]
284259

285-
frameworks += [
286-
"CoreFoundation.framework",
287-
"Foundation.framework",
288-
"CoreBluetooth.framework",
289-
"Network.framework",
290-
]
260+
frameworks += [
261+
"CoreFoundation.framework",
262+
"Foundation.framework",
263+
"CoreBluetooth.framework",
264+
"Network.framework",
265+
]
291266

292-
# Other SDKs are linked statically to Matter.framework but the macosx SDK is linked dynamically but needs some symbols that are
293-
# not exposed by the dylib.
294-
if (sdk == "macosx") {
295-
libs = [ "${root_out_dir}/macos_framework_output/Build/Intermediates.noindex/Matter.build/${output_sdk_type}/Matter.build/out/lib/libCHIP.a" ]
296-
}
267+
# Other SDKs are linked statically to Matter.framework but the macosx SDK is linked dynamically but needs some symbols that are
268+
# not exposed by the dylib.
269+
if (sdk == "macosx") {
270+
libs = [ "${root_out_dir}/macos_framework_output/Build/Intermediates.noindex/Matter.build/${output_sdk_type}/Matter.build/out/lib/libCHIP.a" ]
297271
}
298272

299273
if (enable_provisional_features) {

examples/darwin-framework-tool/args.gni

+7-9
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,13 @@ import("//build_overrides/chip.gni")
1616

1717
import("${chip_root}/config/standalone/args.gni")
1818

19-
import("${chip_root}/examples/chip-tool/chip-tool.gni")
20-
2119
chip_crypto = "boringssl"
2220

23-
if (config_enable_yaml_tests) {
24-
chip_device_project_config_include = "<CHIPProjectAppConfig.h>"
25-
chip_project_config_include = "<CHIPProjectAppConfig.h>"
21+
chip_device_project_config_include =
22+
"${chip_root}/examples/darwin-framework-tool/include/CHIPProjectAppConfig.h"
23+
chip_project_config_include =
24+
"${chip_root}/examples/darwin-framework-tool/include/CHIPProjectAppConfig.h"
2625

27-
chip_project_config_include_dirs =
28-
[ "${chip_root}/examples/darwin-framework-tool/include" ]
29-
chip_project_config_include_dirs += [ "${chip_root}/config/standalone" ]
30-
}
26+
chip_project_config_include_dirs =
27+
[ "${chip_root}/examples/darwin-framework-tool/include" ]
28+
chip_project_config_include_dirs += [ "${chip_root}/config/standalone" ]

examples/darwin-framework-tool/main.mm

-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
#include "commands/storage/Commands.h"
3232

3333
#include <zap-generated/cluster/Commands.h>
34-
#include <zap-generated/test/Commands.h>
3534

3635
int main(int argc, const char * argv[])
3736
{
@@ -47,7 +46,6 @@ int main(int argc, const char * argv[])
4746
registerCommandsPayload(commands);
4847
registerClusterOtaSoftwareUpdateProviderInteractive(commands);
4948
registerCommandsStorage(commands);
50-
registerCommandsTests(commands);
5149
registerClusters(commands);
5250
return commands.Run(argc, (char **) argv);
5351
}

examples/darwin-framework-tool/templates/tests/ciTests.json

-80
This file was deleted.

examples/darwin-framework-tool/templates/tests/commands.zapt

-63
This file was deleted.

examples/darwin-framework-tool/templates/tests/manualTests.json

-3
This file was deleted.

0 commit comments

Comments
 (0)