Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename chip-tool-darwin to darwin-framework-tool #18903

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/darwin-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ jobs:
run: |
./scripts/run_in_build_env.sh \
"./scripts/build/build_examples.py \
--target darwin-x64-chip-tool-darwin-${BUILD_VARIANT} \
--target darwin-x64-darwin-framework-tool-${BUILD_VARIANT} \
--target darwin-x64-all-clusters-${BUILD_VARIANT} \
--target darwin-x64-lock-${BUILD_VARIANT} \
--target darwin-x64-ota-provider-${BUILD_VARIANT} \
Expand All @@ -100,7 +100,7 @@ jobs:
run: |
./scripts/run_in_build_env.sh \
"./scripts/tests/run_test_suite.py \
--chip-tool ./out/darwin-x64-chip-tool-darwin-${BUILD_VARIANT}/chip-tool-darwin \
--chip-tool ./out/darwin-x64-darwin-framework-tool-${BUILD_VARIANT}/darwin-framework-tool \
--target-skip-glob '{TestGroupMessaging}' \
run \
--iterations 1 \
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/darwin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,10 @@ jobs:
- name: Clean Build
run: xcodebuild clean
working-directory: src/darwin/Framework
- name: Build example chip-tool-darwin
- name: Build example darwin-framework-tool
timeout-minutes: 15
run: |
scripts/examples/gn_build_example.sh examples/chip-tool-darwin out/debug chip_config_network_layer_ble=false is_asan=true
scripts/examples/gn_build_example.sh examples/darwin-framework-tool out/debug chip_config_network_layer_ble=false is_asan=true
- name: Build example All Clusters Server
timeout-minutes: 15
run: |
Expand Down
7 changes: 4 additions & 3 deletions BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") {
enable_standalone_chip_tool_build =
enable_default_builds && host_os != "win"

# Build the chip-tool-darwin example.
# Build the darwin-framework-tool example.
enable_standalone_chip_tool_darwin_build =
enable_default_builds && host_os == "mac"

Expand Down Expand Up @@ -345,8 +345,9 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") {

if (enable_standalone_chip_tool_darwin_build) {
group("standalone_chip_tool_darwin") {
deps =
[ "${chip_root}/examples/chip-tool-darwin(${standalone_toolchain})" ]
deps = [
"${chip_root}/examples/darwin-framework-tool(${standalone_toolchain})",
]
}
}

Expand Down
4 changes: 2 additions & 2 deletions docs/BUG_REPORT.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ build) to get started. Beyond that, you can refine if more items seem relevant:
* `Tested with avahi-build and it passes/fails` helps the developer with
information of non-default builds that pass/fail to narrow down the problem

* `Passes with chip-tool-darwin and repl but fails with chip-tool` helps the
developer in narrowing down the problem
* `Passes with darwin-framework-tool and repl but fails with chip-tool` helps
the developer in narrowing down the problem

### Additional information

Expand Down
24 changes: 0 additions & 24 deletions examples/chip-tool-darwin/templates/README.zapt

This file was deleted.

File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ assert(chip_build_tools)
config("config") {
include_dirs = [
".",
"${chip_root}/zzz_generated/chip-tool-darwin",
"${chip_root}/zzz_generated/darwin-framework-tool",
"${chip_root}/examples/chip-tool/commands/clusters/ComplexArgument.h",
]

Expand All @@ -35,7 +35,7 @@ config("config") {
]
}

executable("chip-tool-darwin") {
executable("darwin-framework-tool") {
sources = [
"${chip_root}/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp",
"commands/clusters/ClusterCommandBridge.h",
Expand All @@ -54,7 +54,7 @@ executable("chip-tool-darwin") {
]

if (config_enable_yaml_tests) {
sources += [ "${chip_root}/zzz_generated/chip-tool-darwin/zap-generated/cluster/CHIPTestClustersObjc.mm" ]
sources += [ "${chip_root}/zzz_generated/darwin-framework-tool/zap-generated/cluster/CHIPTestClustersObjc.mm" ]
}

deps = [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Matter chip-tool-darwin
# Matter darwin-framework-tool

An example application that uses Matter to send messages to a Matter server.

Expand All @@ -20,15 +20,15 @@ background on build prerequisites.
Building the example application is quite straightforward.

```
scripts/examples/gn_build_example.sh examples/chip-tool-darwin SOME-PATH/
scripts/examples/gn_build_example.sh examples/darwin-framework-tool SOME-PATH/
```

which puts the binary at `SOME-PATH/chip-tool-darwin`.
which puts the binary at `SOME-PATH/darwin-framework-tool`.

## Using the Client to commission a device

In order to send commands to a device, it must be commissioned with the client.
chip-tool-darwin currently only supports commissioning and remembering one
darwin-framework-tool currently only supports commissioning and remembering one
device at a time. The configuration state is stored in
`/tmp/chip_tool_config.ini`; deleting this and other `.ini` files in `/tmp` can
sometimes resolve issues due to stale configuration.
Expand All @@ -43,14 +43,14 @@ and choose the pairing mode.
The command below will pair devices with the provided IP, discriminator and
setup code.

$ chip-tool-darwin pairing ethernet {NODE_ID_TO_ASSIGN} 20202021 3840 {IP_ADDRESS}
$ darwin-framework-tool pairing ethernet {NODE_ID_TO_ASSIGN} 20202021 3840 {IP_ADDRESS}

In this case, the device will be assigned node id `${NODE_ID_TO_ASSIGN}` (which
must be a decimal number or a 0x-prefixed hex number).

### Forget the currently-commissioned device

$ chip-tool-darwin pairing unpair
$ darwin-framework-tool pairing unpair

## Using the Client to Send Matter Commands

Expand All @@ -59,7 +59,7 @@ the target cluster name, the target command name as well as an endpoint id.

The endpoint id must be between 1 and 240.

$ chip-tool-darwin onoff on 1
$ darwin-framework-tool onoff on 1

The client will send a single command packet and then exit.

Expand All @@ -68,13 +68,13 @@ The client will send a single command packet and then exit.
To get the list of supported clusters, run the built executable without any
arguments.

$ chip-tool-darwin
$ darwin-framework-tool

Example output:

```bash
Usage:
./chip-tool-darwin cluster_name command_name [param1 param2 ...]
./darwin-framework-tool cluster_name command_name [param1 param2 ...]

+-------------------------------------------------------------------------------------+
| Clusters: |
Expand All @@ -99,18 +99,18 @@ Usage:
To get the list of commands for a specific cluster, run the built executable
with the target cluster name.

$ chip-tool-darwin onoff
$ darwin-framework-tool onoff

### How to get the list of supported attributes for a specific cluster

To the the list of attributes for a specific cluster, run the built executable
with the target cluster name and the `read` command name.

$ chip-tool-darwin onoff read
$ darwin-framework-tool onoff read

### How to get the list of parameters for a command

To get the list of parameters for a specific command, run the built executable
with the target cluster name and the target command name

$ chip-tool-darwin onoff on
$ darwin-framework-tool onoff on
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ def codesign(args):

if __name__ == '__main__':
parser = argparse.ArgumentParser(
description='Codesign the chip-tool-darwin binary')
parser.add_argument('--entitlements_path', default='entitlements/chip-tool-darwin.entitlements',
description='Codesign the darwin-framework-tool binary')
parser.add_argument('--entitlements_path', default='entitlements/darwin-framework-tool.entitlements',
help='Set the entitlements for codesign', required=True)
parser.add_argument(
'--log_path', help='Output log file destination', required=True)
Expand Down
4 changes: 2 additions & 2 deletions scripts/build/build/targets.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ def HostTargets():
'all-clusters', app=HostApp.ALL_CLUSTERS))
if (HostBoard.NATIVE.PlatformName() == 'darwin'):
app_targets.append(target.Extend(
'chip-tool-darwin', app=HostApp.CHIP_TOOL_DARWIN))
'darwin-framework-tool', app=HostApp.CHIP_TOOL_DARWIN))
app_targets.append(target.Extend('chip-tool', app=HostApp.CHIP_TOOL))
app_targets.append(target.Extend('thermostat', app=HostApp.THERMOSTAT))
app_targets.append(target.Extend('minmdns', app=HostApp.MIN_MDNS))
Expand All @@ -262,7 +262,7 @@ def HostTargets():
# Possible build variants. Note that number of potential
# builds is exponential here
builder.AppendVariant(name="same-event-loop", validator=AcceptNameWithSubstrings(
['-chip-tool', '-chip-tool-darwin']), separate_event_loop=False),
['-chip-tool', '-darwin-framework-tool']), separate_event_loop=False),
builder.AppendVariant(name="no-interactive", validator=AcceptNameWithSubstrings(
['-chip-tool']), interactive_mode=False),
builder.AppendVariant(name="ipv6only", enable_ipv4=False),
Expand Down
6 changes: 3 additions & 3 deletions scripts/build/builders/host.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def ExamplePath(self):
elif self == HostApp.CHIP_TOOL:
return 'chip-tool'
elif self == HostApp.CHIP_TOOL_DARWIN:
return 'chip-tool-darwin'
return 'darwin-framework-tool'
elif self == HostApp.THERMOSTAT:
return 'thermostat/linux'
elif self == HostApp.RPC_CONSOLE:
Expand Down Expand Up @@ -81,8 +81,8 @@ def OutputNames(self):
yield 'chip-tool'
yield 'chip-tool.map'
elif self == HostApp.CHIP_TOOL_DARWIN:
yield 'chip-tool-darwin'
yield 'chip-tool-darwin.map'
yield 'darwin-framework-tool'
yield 'darwin-framework-tool.map'
elif self == HostApp.THERMOSTAT:
yield 'thermostat-app'
yield 'thermostat-app.map'
Expand Down
10 changes: 5 additions & 5 deletions scripts/tools/zap_regen_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def setupArgumentsParser():
description='Generate content from ZAP files')
parser.add_argument('--type', default='all', choices=['all', 'tests'],
help='Choose which content type to generate (default: all)')
parser.add_argument('--tests', default='all', choices=['all', 'chip-tool', 'chip-tool-darwin', 'app1', 'app2'],
parser.add_argument('--tests', default='all', choices=['all', 'chip-tool', 'darwin-framework-tool', 'app1', 'app2'],
help='When generating tests only target, Choose which tests to generate (default: all)')
parser.add_argument('--dry-run', default=False, action='store_true',
help="Don't do any generationl just log what targets would be generated (default: False)")
Expand Down Expand Up @@ -141,10 +141,10 @@ def getTestsTemplatesTargets(test_target):
'template': 'examples/chip-tool/templates/tests/templates.json',
'output_dir': 'zzz_generated/chip-tool/zap-generated'
},
'chip-tool-darwin': {
'darwin-framework-tool': {
'zap': 'src/controller/data_model/controller-clusters.zap',
'template': 'examples/chip-tool-darwin/templates/tests/templates.json',
'output_dir': 'zzz_generated/chip-tool-darwin/zap-generated'
'template': 'examples/darwin-framework-tool/templates/tests/templates.json',
'output_dir': 'zzz_generated/darwin-framework-tool/zap-generated'
}
}

Expand Down Expand Up @@ -180,7 +180,7 @@ def getSpecificTemplatesTargets():
'src/app/common/templates/templates.json': 'zzz_generated/app-common/app-common/zap-generated',
'src/app/tests/suites/templates/templates.json': 'zzz_generated/app-common/app-common/zap-generated',
'examples/chip-tool/templates/templates.json': 'zzz_generated/chip-tool/zap-generated',
'examples/chip-tool-darwin/templates/templates.json': 'zzz_generated/chip-tool-darwin/zap-generated',
'examples/darwin-framework-tool/templates/templates.json': 'zzz_generated/darwin-framework-tool/zap-generated',
'src/controller/python/templates/templates.json': None,
'src/darwin/Framework/CHIP/templates/templates.json': None,
'src/controller/java/templates/templates.json': None,
Expand Down
16 changes: 8 additions & 8 deletions src/app/tests/suites/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,13 @@ The process of automatic conversion of test files depends on the
Each of the CHIP device controller implementations uses a dedicated template
translating the tests into an appropriate format.

| Controllers | Template |
| ----------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| POSIX CLI | [examples/chip-tool/templates/partials/test_cluster.zapt](../../../../examples/chip-tool/templates/partials/test_cluster.zapt) |
| Darwin CLI | [examples/chip-tool-darwin/templates/partials/test_cluster.zapt](../../../../examples/chip-tool-darwin/templates/partials/test_cluster.zapt) |
| iOS | [src/darwin/Framework/CHIP/templates/partials/test_cluster.zapt](../../../../src/darwin/Framework/CHIP/templates/partials/test_cluster.zapt) |
| Python | |
| Android | |
| Controllers | Template |
| ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| POSIX CLI | [examples/chip-tool/templates/partials/test_cluster.zapt](../../../../examples/chip-tool/templates/partials/test_cluster.zapt) |
| Darwin CLI | [examples/darwin-framework-tool/templates/partials/test_cluster.zapt](../../../../examples/darwin-framework-tool/templates/partials/test_cluster.zapt) |
| iOS | [src/darwin/Framework/CHIP/templates/partials/test_cluster.zapt](../../../../src/darwin/Framework/CHIP/templates/partials/test_cluster.zapt) |
| Python | |
| Android | |

These dedicated templates share a common
[script](../../zap-templates/common/ClusterTestGeneration.js) which augments the
Expand Down Expand Up @@ -250,7 +250,7 @@ Top level key to define a YAML test: [test](#property-test)
[tests.js](../../../../examples/placeholder/linux/apps/app1/tests.js)

- chip-tool(darwin) tests:
[tests.js](../../../../examples/chip-tool-darwin/templates/tests/tests.js)
[tests.js](../../../../examples/darwin-framework-tool/templates/tests/tests.js)

- chip-tool tests:
[tests.js](../../../../examples/chip-tool/templates/tests/tests.js)
Expand Down
2 changes: 1 addition & 1 deletion src/controller/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ The POSIX CLI chip-tool is located in
### Darwin CLI

The POSIX CLI chip-tool is located in
[../../examples/chip-tool-darwin](../../examples/chip-tool).
[../../examples/darwin-framework-tool](../../examples/chip-tool).

### Python

Expand Down