Skip to content

Commit ed43430

Browse files
committed
Add console tests
1 parent 1df4ee9 commit ed43430

34 files changed

Lines changed: 179 additions & 42 deletions

File tree

l1/l1_e1_sol/sample.yaml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ sample:
44

55
common:
66
sysbuild: true
7-
build_only: true
87
integration_platforms:
98
- nrf52dk/nrf52832
109
- nrf52833dk/nrf52833
@@ -37,4 +36,10 @@ common:
3736
- nrf7002dk/nrf5340/cpuapp/ns
3837

3938
tests:
40-
ncs_inter.l1.e1_sol: {}
39+
ncs_inter.l1.e1_sol:
40+
harness: console
41+
harness_config:
42+
type: one_line
43+
regex:
44+
- "Starting Lesson 1 - Exercise 1"
45+
timeout: 15

l1/l1_e1_sol/src/main.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ int main(void)
5656
{
5757
int ret;
5858

59+
LOG_INF("Starting Lesson 1 - Exercise 1");
60+
5961
if (!gpio_is_ready_dt(&led0)) {
6062
return 0;
6163
}

l1/l1_e2_sol/sample.yaml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ sample:
44

55
common:
66
sysbuild: true
7-
build_only: true
87
integration_platforms:
98
- nrf52dk/nrf52832
109
- nrf52833dk/nrf52833
@@ -37,4 +36,10 @@ common:
3736
- nrf7002dk/nrf5340/cpuapp/ns
3837

3938
tests:
40-
ncs_inter.l1.e2_sol: {}
39+
ncs_inter.l1.e2_sol:
40+
harness: console
41+
harness_config:
42+
type: one_line
43+
regex:
44+
- "Starting Lesson 1 - Exercise 2"
45+
timeout: 15

l1/l1_e2_sol/src/main.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ int main(void)
5656
{
5757
int ret;
5858

59+
LOG_INF("Starting Lesson 1 - Exercise 2");
60+
5961
if (!gpio_is_ready_dt(&led0)) {
6062
return 0;
6163
}

l2/l2_e1_sol/sample.yaml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ sample:
44

55
common:
66
sysbuild: true
7-
build_only: true
87
integration_platforms:
98
- nrf52dk/nrf52832
109
- nrf52833dk/nrf52833
@@ -37,4 +36,10 @@ common:
3736
- nrf7002dk/nrf5340/cpuapp/ns
3837

3938
tests:
40-
ncs_inter.l2.e1_sol: {}
39+
ncs_inter.l2.e1_sol:
40+
harness: console
41+
harness_config:
42+
type: one_line
43+
regex:
44+
- "Starting Exercise 1!"
45+
timeout: 15

l2/l2_e2_sol/sample.yaml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ sample:
44

55
common:
66
sysbuild: true
7-
build_only: true
87
integration_platforms:
98
- nrf52dk/nrf52832
109
- nrf52833dk/nrf52833
@@ -37,4 +36,10 @@ common:
3736
- nrf7002dk/nrf5340/cpuapp/ns
3837

3938
tests:
40-
ncs_inter.l2.e2_sol: {}
39+
ncs_inter.l2.e2_sol:
40+
harness: console
41+
harness_config:
42+
type: one_line
43+
regex:
44+
- "Press button 1 to get a fault error"
45+
timeout: 15

l2/l2_e3_sol/sample.yaml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ sample:
44

55
common:
66
sysbuild: true
7-
build_only: true
87
integration_platforms:
98
- nrf52dk/nrf52832
109
- nrf52833dk/nrf52833
@@ -37,4 +36,10 @@ common:
3736
- nrf7002dk/nrf5340/cpuapp/ns
3837

3938
tests:
40-
ncs_inter.l2.e3_sol: {}
39+
ncs_inter.l2.e3_sol:
40+
harness: console
41+
harness_config:
42+
type: one_line
43+
regex:
44+
- "Press button 1"
45+
timeout: 15

l4/l4_e1_sol/sample.yaml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ sample:
44

55
common:
66
sysbuild: true
7-
build_only: true
87
integration_platforms:
98
- nrf52dk/nrf52832
109
- nrf52833dk/nrf52833
@@ -16,6 +15,7 @@ common:
1615
- nrf5340dk/nrf5340/cpuapp/ns
1716
- nrf54l15dk/nrf54l15/cpuapp
1817
- nrf54l15dk/nrf54l15/cpuapp/ns
18+
- nrf54ls05dk/nrf54ls05b/cpuapp
1919
- nrf54lm20dk/nrf54lm20a/cpuapp
2020
- nrf7002dk/nrf5340/cpuapp
2121
- nrf7002dk/nrf5340/cpuapp/ns
@@ -30,9 +30,16 @@ common:
3030
- nrf5340dk/nrf5340/cpuapp/ns
3131
- nrf54l15dk/nrf54l15/cpuapp
3232
- nrf54l15dk/nrf54l15/cpuapp/ns
33+
- nrf54ls05dk/nrf54ls05b/cpuapp
3334
- nrf54lm20dk/nrf54lm20a/cpuapp
3435
- nrf7002dk/nrf5340/cpuapp
3536
- nrf7002dk/nrf5340/cpuapp/ns
3637

3738
tests:
38-
ncs_inter.l4.e1_sol: {}
39+
ncs_inter.l4.e1_sol:
40+
harness: console
41+
harness_config:
42+
type: one_line
43+
regex:
44+
- "Starting Lesson 4 - Exercise 1"
45+
timeout: 15

l4/l4_e1_sol/src/main.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ int main(void)
2828
{
2929
int err;
3030

31+
LOG_INF("Starting Lesson 4 - Exercise 1");
32+
3133
/* STEP 3.3 - Check if the device is ready */
3234
if (!pwm_is_ready_dt(&pwm_led0)) {
3335
LOG_ERR("Error: PWM device %s is not ready", pwm_led0.dev->name);

l4/l4_e2_sol/sample.yaml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ sample:
44

55
common:
66
sysbuild: true
7-
build_only: true
87
integration_platforms:
98
- nrf52dk/nrf52832
109
- nrf52833dk/nrf52833
@@ -37,4 +36,10 @@ common:
3736
- nrf7002dk/nrf5340/cpuapp/ns
3837

3938
tests:
40-
ncs_inter.l4.e2_sol: {}
39+
ncs_inter.l4.e2_sol:
40+
harness: console
41+
harness_config:
42+
type: one_line
43+
regex:
44+
- "Starting Lesson 4 - Exercise 2"
45+
timeout: 15

0 commit comments

Comments
 (0)