Skip to content

Commit

Permalink
app: add console harness
Browse files Browse the repository at this point in the history
Add console harness to the firmware application.

Signed-off-by: Henrik Brix Andersen <[email protected]>
  • Loading branch information
henrikbrixandersen committed Sep 25, 2024
1 parent 156ce3f commit 0625ade
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,13 @@ sample:
name: cannectivity
common:
tags: usb can
build_only: true
platform_exclude:
- native_sim
harness: console
harness_config:
type: one_line
regex:
- "CANnectivity firmware initialized with .*"
tests:
app.cannectivity:
depends_on: usb_device can
Expand Down
3 changes: 3 additions & 0 deletions app/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,7 @@ int main(void)
LOG_ERR("failed to enable USB device");
return err;
}

LOG_INF("CANnectivity firmware initialized with %u channel%s\n", ARRAY_SIZE(channels),
ARRAY_SIZE(channels) > 1 ? "s" : "");
}

0 comments on commit 0625ade

Please sign in to comment.