Skip to content

Commit 9f97e18

Browse files
ngphibangdleach02
authored andcommitted
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>
1 parent 5e627b6 commit 9f97e18

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

samples/drivers/video/capture/sample.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,17 @@ tests:
1010
- platform:mimxrt1064_evk:SHIELD="dvp_fpc24_mt9m114;rk043fn66hs_ctg"
1111
- platform:mimxrt1170_evk/mimxrt1176/cm7:SHIELD="nxp_btb44_ov5640;rk055hdmipi4ma0"
1212
- platform:mimxrt1170_evk@B/mimxrt1176/cm7:SHIELD="nxp_btb44_ov5640;rk055hdmipi4ma0"
13+
extra_configs:
14+
- CONFIG_TEST=y
1315
harness: console
1416
harness_config:
1517
fixture: fixture_camera
1618
type: multi_line
1719
ordered: true
1820
regex:
19-
- "Capture started"
20-
- "Got frame"
21-
- "size"
22-
- "timestamp"
21+
- "Got frame \\d+"
22+
- "size: \\d+;"
23+
- "timestamp \\d+"
2324
platform_allow:
2425
- arduino_nicla_vision/stm32h747xx/m7
2526
- mimxrt1064_evk

samples/drivers/video/capture/src/main.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,12 @@
1010
#include <zephyr/drivers/display.h>
1111
#include <zephyr/drivers/video.h>
1212

13+
#ifdef CONFIG_TEST
14+
#define LOG_LEVEL LOG_LEVEL_DBG
15+
#else
1316
#define LOG_LEVEL CONFIG_LOG_DEFAULT_LEVEL
17+
#endif
18+
1419
#include <zephyr/logging/log.h>
1520
LOG_MODULE_REGISTER(main);
1621

0 commit comments

Comments
 (0)