From 37bdd3aff23b15afd77a468486ad69df1401f7f9 Mon Sep 17 00:00:00 2001 From: Tennessee Carmel-Veilleux Date: Wed, 19 Jan 2022 16:50:18 -0500 Subject: [PATCH] Enable building tracing in chip-tool by default (#13702) * 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 #11552 * Restyled by prettier-markdown Co-authored-by: Restyled.io --- examples/chip-tool/README.md | 13 ++++--------- examples/chip-tool/args.gni | 1 + 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/examples/chip-tool/README.md b/examples/chip-tool/README.md index b0a8a513e204e9..e39c0859f3c583 100644 --- a/examples/chip-tool/README.md +++ b/examples/chip-tool/README.md @@ -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 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: diff --git a/examples/chip-tool/args.gni b/examples/chip-tool/args.gni index a76f3e8996ce3c..32852e06139527 100644 --- a/examples/chip-tool/args.gni +++ b/examples/chip-tool/args.gni @@ -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 = "" chip_project_config_include = ""