Skip to content

Commit

Permalink
Enable building tracing in chip-tool by default (project-chip#13702)
Browse files Browse the repository at this point in the history
* Enable building tracing in chip-tool by default

- Tracing now works enough that it's generally useful
- Tracing is already gated by command-line args, so not
  running by default.
- This PR enables the build to always include tracing feature
  enabled in chip-tool since it's generally useful.

Testing done:

- Unit tests and integration pass with no change
- chip-tool now always has --trace_log/--trace_file enabled

Issue project-chip#11552

* Restyled by prettier-markdown

Co-authored-by: Restyled.io <[email protected]>
  • Loading branch information
2 people authored and selissia committed Jan 28, 2022
1 parent c0c281d commit 37bdd3a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
13 changes: 4 additions & 9 deletions examples/chip-tool/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,16 @@ scripts/examples/gn_build_example.sh examples/chip-tool SOME-PATH/

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

### Building with message tracing
### Using message tracing

Message tracing allows capture of the secure messages which can be used for test
automation.

```
gn gen out/with_trace/ --args='import("//with_pw_trace.gni")'
ninja -C out/with_trace chip-tool
```

This enables tracing and adds additional flags to chip-tool to control where the
traces should go:
There are additional flags to chip-tool to control where the traces should go:

- --trace_file <file> Outputs trace data to the specified file.
- --trace_log Outputs trace data to the chip log stream.
- --trace_log <0/1> Outputs trace data to the console with automation logs if
set to 1

For example:

Expand Down
1 change: 1 addition & 0 deletions examples/chip-tool/args.gni
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import("//build_overrides/chip.gni")

import("${chip_root}/config/standalone/args.gni")
import("${chip_root}/examples/chip-tool/with_pw_trace.gni")

chip_device_project_config_include = "<CHIPProjectAppConfig.h>"
chip_project_config_include = "<CHIPProjectAppConfig.h>"
Expand Down

0 comments on commit 37bdd3a

Please sign in to comment.