samples: CAN: Add testing harness

Add simple console testing harness for expected output.  This allows us
to validate that the test is running properly on hardware.

We expect the sample to report back somthing like:

Counter received: 1
Counter received: 2
Counter received: 3
Counter received: 4
...

etc.

So have a simple regex check for it.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
Kumar Gala 2019-08-21 15:18:09 -05:00 committed by Anas Nashif
commit 41712b71b2

View file

@ -4,3 +4,8 @@ tests:
sample.drivers.can:
tags: CAN
depends_on: can
harness: console
harness_config:
type: one_line
regex:
- "Counter received: (.*)"