Skip to content

Commit

Permalink
Update darwin framework tool build dependencies (#20582)
Browse files Browse the repository at this point in the history
  • Loading branch information
krypton36 committed Jul 14, 2022
1 parent 61dd4d0 commit 37bb2df
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 16 deletions.
34 changes: 21 additions & 13 deletions examples/darwin-framework-tool/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ if (config_use_interactive_mode) {

assert(chip_build_tools)

action("build-darwin-framwork") {
action("build-darwin-framework") {
script = "${chip_root}/scripts/build/build_darwin_framework.py"

inputs = [ "${chip_root}/src/darwin/Framework/Matter.xcodeproj" ]
Expand All @@ -51,7 +51,8 @@ config("config") {
"${chip_root}/examples/darwin-framework-tool/commands/common",
"${chip_root}/zzz_generated/darwin-framework-tool",
"${chip_root}/zzz_generated/controller-clusters",
"${chip_root}/examples/chip-tool/commands/clusters/ComplexArgument.h",
"${chip_root}/examples/chip-tool",
"${chip_root}/zzz_generated/chip-tool",
"${root_out_dir}/macos_framework_output",
]

Expand All @@ -70,13 +71,11 @@ config("config") {

executable("darwin-framework-tool") {
sources = [
# We have to include privilege-storage.cpp here, not in the "Darwin
# framework" library, because otherwise the weak symbols from
# RequiredPrivilege.cpp mean we never actually pull in the function from
# privilege-storage.cpp.
"${chip_root}/src/app/util/privilege-storage.cpp",
"${chip_root}/examples/chip-tool/commands/common/Command.cpp",
"${chip_root}/examples/chip-tool/commands/common/Command.h",
"${chip_root}/examples/chip-tool/commands/common/Commands.cpp",
"${chip_root}/examples/chip-tool/commands/common/Commands.h",
"${chip_root}/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp",
"${chip_root}/zzz_generated/controller-clusters/zap-generated/CHIPClusters.h",
"commands/clusters/ClusterCommandBridge.h",
"commands/clusters/ModelCommandBridge.mm",
"commands/clusters/ReportCommandBridge.h",
Expand All @@ -99,11 +98,20 @@ executable("darwin-framework-tool") {
]

deps = [
":build-darwin-framwork",
"${chip_root}/examples/chip-tool:chip-tool-utils",
"${chip_root}/src/app/server",
"${chip_root}/src/lib",
"${chip_root}/src/platform",
":build-darwin-framework",
"${chip_root}/src/app/tests/suites/commands/delay",

# IM is needed for MTRError
"${chip_root}/src/app/tests/suites/commands/interaction_model",

# Log is needed by tests UserPrompt and Log
"${chip_root}/src/app/tests/suites/commands/log",

# System is needed by tests FactoryReset etc..
"${chip_root}/src/app/tests/suites/commands/system",

# pics is needed by tests
"${chip_root}/src/app/tests/suites/pics",
"${chip_root}/third_party/inipp",
"${chip_root}/third_party/jsoncpp",
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@
#import "MTRError_Utils.h"
#import <Matter/Matter.h>

#include <lib/support/UnitTestUtils.h>

#include "ModelCommandBridge.h"

class ClusterCommand : public ModelCommand {
Expand Down Expand Up @@ -97,7 +95,7 @@ class ClusterCommand : public ModelCommand {
}];

if (mRepeatDelayInMs.HasValue()) {
chip::test_utils::SleepMillis(mRepeatDelayInMs.Value());
[NSThread sleepForTimeInterval:((double) mRepeatDelayInMs.Value()) / 1000];
}
}
return CHIP_NO_ERROR;
Expand Down

0 comments on commit 37bb2df

Please sign in to comment.