samples: video: capture: Fix camera fixture test

The logs that the fixture test are based on are not printed anymore due
to recent changes from "printk" to "LOG_DBG". Change the log level so
that it can work again.

Remove "Capture started" as it is not a relevant test regex. Logs are
sometimes not correctly printed in the console, for example, we can see:

DEBUG   - DEVICE: muart:~$ [mapture started

As "Capture started" is a one-time log, fixture test will then fail due
to timeout.

Also, consolidate other regex.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
This commit is contained in:
Phi Bang Nguyen 2024-10-02 13:04:06 +02:00 committed by David Leach
commit 9f97e18ddd
2 changed files with 10 additions and 4 deletions

View file

@ -10,16 +10,17 @@ tests:
- platform:mimxrt1064_evk:SHIELD="dvp_fpc24_mt9m114;rk043fn66hs_ctg"
- platform:mimxrt1170_evk/mimxrt1176/cm7:SHIELD="nxp_btb44_ov5640;rk055hdmipi4ma0"
- platform:mimxrt1170_evk@B/mimxrt1176/cm7:SHIELD="nxp_btb44_ov5640;rk055hdmipi4ma0"
extra_configs:
- CONFIG_TEST=y
harness: console
harness_config:
fixture: fixture_camera
type: multi_line
ordered: true
regex:
- "Capture started"
- "Got frame"
- "size"
- "timestamp"
- "Got frame \\d+"
- "size: \\d+;"
- "timestamp \\d+"
platform_allow:
- arduino_nicla_vision/stm32h747xx/m7
- mimxrt1064_evk

View file

@ -10,7 +10,12 @@
#include <zephyr/drivers/display.h>
#include <zephyr/drivers/video.h>
#ifdef CONFIG_TEST
#define LOG_LEVEL LOG_LEVEL_DBG
#else
#define LOG_LEVEL CONFIG_LOG_DEFAULT_LEVEL
#endif
#include <zephyr/logging/log.h>
LOG_MODULE_REGISTER(main);