From 41712b71b2785f1188964a972f791f6fcc2a55dc Mon Sep 17 00:00:00 2001 From: Kumar Gala Date: Wed, 21 Aug 2019 15:18:09 -0500 Subject: [PATCH] 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 --- samples/drivers/CAN/sample.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/samples/drivers/CAN/sample.yaml b/samples/drivers/CAN/sample.yaml index 51128add9a2..52db5f94b86 100644 --- a/samples/drivers/CAN/sample.yaml +++ b/samples/drivers/CAN/sample.yaml @@ -4,3 +4,8 @@ tests: sample.drivers.can: tags: CAN depends_on: can + harness: console + harness_config: + type: one_line + regex: + - "Counter received: (.*)"