Skip to content

Commit de104f2

Browse files
hakehuangnashif
authored andcommitted
samples: display: specific fixture name
add display type for fixtures to avoid conflcts in NXP platform 1. add required regex for console harness. 2. add message after processing, ensure the flow is OK 3. reduce the test time in TEST mode Signed-off-by: Hake Huang <[email protected]>
1 parent b16b161 commit de104f2

File tree

3 files changed

+26
-4
lines changed

3 files changed

+26
-4
lines changed

samples/drivers/display/sample.yaml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ tests:
1717
- CONFIG_SDL_DISPLAY=n
1818
- CONFIG_TEST=y
1919
tags: display
20+
harness: console
21+
harness_config:
22+
fixture: fixture_display
23+
type: one_line
24+
regex:
25+
- "Display sample for (.*)"
2026
sample.display.g1120b0mipi:
2127
platform_allow: mimxrt595_evk/mimxrt595s/cm33
2228
tags: display
@@ -26,8 +32,14 @@ tests:
2632
- CONFIG_PM=y
2733
- CONFIG_PM_DEVICE=y
2834
- CONFIG_IDLE_STACK_SIZE=400
35+
- CONFIG_TEST=y
2936
harness_config:
30-
fixture: fixture_display
37+
fixture: fixture_display_g1120b0mipi
38+
type: multi_line
39+
regex:
40+
- "sample: Display sample for (.*)"
41+
- "Display starts"
42+
- "Display sample test mode done (.*)"
3143
sample.display.builtin:
3244
# This test case is intended to insure that this sample builds & runs
3345
# correctly for all boards that have a supported built-in display.
@@ -59,6 +71,9 @@ tests:
5971
extra_args: SHIELD=rk043fn02h_ct
6072
harness_config:
6173
fixture: fixture_display
74+
type: one_line
75+
regex:
76+
- "Display sample for (.*)"
6277
sample.display.shield:
6378
# This test case is intended to verify support for shields on boards
6479
# known to support them. It is not intended to cover all combinations
@@ -68,6 +83,9 @@ tests:
6883
harness: console
6984
harness_config:
7085
fixture: fixture_display
86+
type: one_line
87+
regex:
88+
- "Display sample for (.*)"
7189
extra_args:
7290
- platform:lpcxpresso55s69/lpc55s69/cpu0:SHIELD=adafruit_2_8_tft_touch_v2
7391
- platform:nrf52840dk/nrf52840:SHIELD=ssd1306_128x32

samples/drivers/display/src/main.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,13 +349,15 @@ int main(void)
349349
x = 0;
350350
y = capabilities.y_resolution - rect_h;
351351

352+
LOG_INF("Display starts");
352353
while (1) {
353354
fill_buffer_fnc(BOTTOM_LEFT, grey_count, buf, buf_size);
354355
display_write(display_dev, x, y, &buf_desc, buf);
355356
++grey_count;
356357
k_msleep(grey_scale_sleep);
357358
#if CONFIG_TEST
358-
if (grey_count >= 1024) {
359+
if (grey_count >= 30) {
360+
LOG_INF("Display sample test mode done %s", display_dev->name);
359361
break;
360362
}
361363
#endif

samples/subsys/display/lvgl/sample.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ tests:
4040
- mimxrt595_evk/mimxrt595s/cm33
4141
integration_platforms:
4242
- mimxrt1170_evk/mimxrt1176/cm7
43+
harness_config:
44+
fixture: fixture_display_rk055hdmipi4m
4345
sample.subsys.display.lvgl.st_b_lcd40_dsi1_mb1166:
4446
filter: dt_compat_enabled("orisetech,otm8009a")
4547
platform_allow: stm32h747i_disco/stm32h747xx/m7
@@ -82,7 +84,7 @@ tests:
8284
harness: console
8385
extra_args: SHIELD=rk043fn66hs_ctg
8486
harness_config:
85-
fixture: fixture_display
87+
fixture: fixture_display_rk043fn66hs_ctg
8688
samples.subsys.display.lvgl.rk043fn02h_ct:
8789
platform_allow:
8890
- mimxrt1064_evk
@@ -95,4 +97,4 @@ tests:
9597
harness: console
9698
extra_args: SHIELD=rk043fn02h_ct
9799
harness_config:
98-
fixture: fixture_display
100+
fixture: fixture_display_rk043fn02h_ct

0 commit comments

Comments
 (0)