Skip to content

Commit bb5902b

Browse files
committed
feat(tests): add new GPIO interrupt test scenarios
1 parent 86a634b commit bb5902b

12 files changed

+689
-3
lines changed

tests/validation/gpio/scenario.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Pushbutton counter test
22
version: 1
3-
author: Jan Prochazka ([email protected])
3+
author: Jan Prochazka ([email protected]) + Jakub Andrysek ([email protected])
44

55
steps:
66
#### GPIO read - basic test
@@ -12,7 +12,7 @@ steps:
1212
part-id: btn1
1313
control: pressed
1414
value: 1
15-
15+
1616
- wait-serial: "BTN read as LOW"
1717

1818
# Set the button to LOW
@@ -43,6 +43,6 @@ steps:
4343
pin: A # Anode pin
4444
value: 0
4545

46-
46+
4747
#### GPIO end test
4848
- wait-serial: "GPIO test END"
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"platforms": {
3+
"hardware": false,
4+
"qemu": false,
5+
"wokwi": true
6+
}
7+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"version": 1,
3+
"author": "kubaandrysek",
4+
"editor": "wokwi",
5+
"parts": [
6+
{
7+
"type": "board-esp32-devkit-c-v4",
8+
"id": "esp32",
9+
"top": -57.6,
10+
"left": -177.56,
11+
"attrs": {}
12+
},
13+
{
14+
"type": "wokwi-pushbutton",
15+
"id": "btn1",
16+
"top": 83,
17+
"left": 9.6,
18+
"attrs": { "color": "green" }
19+
},
20+
{
21+
"type": "wokwi-led",
22+
"id": "led1",
23+
"top": -39.6,
24+
"left": -41.4,
25+
"rotate": 90,
26+
"attrs": { "color": "red" }
27+
}
28+
],
29+
"connections": [
30+
[ "esp32:RX", "$serialMonitor:TX", "", [] ],
31+
[ "esp32:TX", "$serialMonitor:RX", "", [] ],
32+
[ "btn1:1.l", "esp32:0", "blue", [ "h-19.2", "v48", "h-38.4" ] ],
33+
[ "btn1:2.r", "esp32:GND.1", "black", [ "h19.4", "v173", "h-269.2", "v-98.23" ] ],
34+
[ "esp32:GND.2", "led1:C", "black", [ "v0" ] ],
35+
[ "esp32:4", "led1:A", "green", [ "h0" ] ]
36+
],
37+
"dependencies": {}
38+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"version": 1,
3+
"author": "kubaandrysek",
4+
"editor": "wokwi",
5+
"parts": [
6+
{
7+
"type": "board-esp32-c3-devkitm-1",
8+
"id": "esp32",
9+
"top": -57.6,
10+
"left": -177.56,
11+
"attrs": {}
12+
},
13+
{
14+
"type": "wokwi-pushbutton",
15+
"id": "btn1",
16+
"top": -22.6,
17+
"left": -19.2,
18+
"attrs": { "color": "green" }
19+
},
20+
{
21+
"type": "wokwi-led",
22+
"id": "led1",
23+
"top": 28,
24+
"left": -286.6,
25+
"rotate": 270,
26+
"attrs": { "color": "red" }
27+
}
28+
],
29+
"connections": [
30+
[ "esp32:RX", "$serialMonitor:TX", "", [] ],
31+
[ "esp32:TX", "$serialMonitor:RX", "", [] ],
32+
[ "btn1:1.l", "esp32:0", "blue", [ "h-28.8", "v144", "h-144", "v-95.7" ] ],
33+
[ "btn1:2.r", "esp32:GND.1", "black", [ "h19.4", "v173", "h-269.2", "v-98.23" ] ],
34+
[ "esp32:GND.4", "led1:C", "black", [ "h0" ] ],
35+
[ "esp32:4", "led1:A", "green", [ "v0" ] ]
36+
],
37+
"dependencies": {}
38+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"version": 1,
3+
"author": "kubaandrysek",
4+
"editor": "wokwi",
5+
"parts": [
6+
{
7+
"type": "board-esp32-c6-devkitc-1",
8+
"id": "esp32",
9+
"top": -57.6,
10+
"left": -177.56,
11+
"attrs": {}
12+
},
13+
{
14+
"type": "wokwi-pushbutton",
15+
"id": "btn1",
16+
"top": -22.6,
17+
"left": -19.2,
18+
"attrs": { "color": "green" }
19+
},
20+
{
21+
"type": "wokwi-led",
22+
"id": "led1",
23+
"top": 56.8,
24+
"left": -286.6,
25+
"rotate": 270,
26+
"attrs": { "color": "red" }
27+
}
28+
],
29+
"connections": [
30+
[ "esp32:RX", "$serialMonitor:TX", "", [] ],
31+
[ "esp32:TX", "$serialMonitor:RX", "", [] ],
32+
[ "btn1:1.l", "esp32:0", "blue", [ "h-19.2", "v-96", "h-163.2", "v93.77" ] ],
33+
[ "btn1:2.r", "esp32:GND.1", "black", [ "h19.4", "v173", "h-269.2", "v-98.23" ] ],
34+
[ "esp32:GND.1", "led1:C", "black", [ "h0" ] ],
35+
[ "esp32:4", "led1:A", "green", [ "h0" ] ]
36+
],
37+
"dependencies": {}
38+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"version": 1,
3+
"author": "kubaandrysek",
4+
"editor": "wokwi",
5+
"parts": [
6+
{
7+
"type": "board-esp32-h2-devkitm-1",
8+
"id": "esp32",
9+
"top": -57.6,
10+
"left": -177.56,
11+
"attrs": {}
12+
},
13+
{
14+
"type": "wokwi-pushbutton",
15+
"id": "btn1",
16+
"top": -22.6,
17+
"left": -19.2,
18+
"attrs": { "color": "green" }
19+
},
20+
{
21+
"type": "wokwi-led",
22+
"id": "led1",
23+
"top": -0.8,
24+
"left": -267.4,
25+
"rotate": 270,
26+
"attrs": { "color": "red" }
27+
}
28+
],
29+
"connections": [
30+
[ "esp32:RX", "$serialMonitor:TX", "", [] ],
31+
[ "esp32:TX", "$serialMonitor:RX", "", [] ],
32+
[ "btn1:1.l", "esp32:0", "blue", [ "h-19.2", "v-96", "h-163.2", "v93.77" ] ],
33+
[ "btn1:2.r", "esp32:GND.1", "black", [ "h19.4", "v173", "h-269.2", "v-98.23" ] ],
34+
[ "esp32:GND.2", "led1:C", "black", [ "h0" ] ],
35+
[ "esp32:4", "led1:A", "green", [ "h-29.14", "v-26.57" ] ]
36+
],
37+
"dependencies": {}
38+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"version": 1,
3+
"author": "kubaandrysek",
4+
"editor": "wokwi",
5+
"parts": [
6+
{
7+
"type": "board-esp32-p4-function-ev",
8+
"id": "esp32",
9+
"top": -66.32,
10+
"left": -277.63,
11+
"attrs": {}
12+
},
13+
{ "type": "wokwi-led", "id": "led1", "top": -138, "left": -92.2, "attrs": { "color": "red" } },
14+
{
15+
"type": "wokwi-pushbutton",
16+
"id": "btn1",
17+
"top": -199.2,
18+
"left": 0.2,
19+
"rotate": 180,
20+
"attrs": { "color": "green" }
21+
}
22+
],
23+
"connections": [
24+
[ "esp32:38", "$serialMonitor:TX", "", [] ],
25+
[ "esp32:37", "$serialMonitor:RX", "", [] ],
26+
[ "esp32:GND.1", "led1:C", "black", [ "v0" ] ],
27+
[ "esp32:4", "led1:A", "green", [ "v-19.2", "h-48" ] ],
28+
[ "esp32:GND.3", "btn1:2.r", "black", [ "v0" ] ],
29+
[ "esp32:0", "btn1:2.l", "green", [ "v-57.6", "h86.4", "v-76.6" ] ]
30+
],
31+
"dependencies": {}
32+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"version": 1,
3+
"author": "kubaandrysek",
4+
"editor": "wokwi",
5+
"parts": [
6+
{
7+
"type": "board-esp32-s2-devkitm-1",
8+
"id": "esp32",
9+
"top": -57.6,
10+
"left": -177.56,
11+
"attrs": {}
12+
},
13+
{
14+
"type": "wokwi-pushbutton",
15+
"id": "btn1",
16+
"top": -22.6,
17+
"left": -19.2,
18+
"attrs": { "color": "green" }
19+
},
20+
{
21+
"type": "wokwi-led",
22+
"id": "led1",
23+
"top": -0.8,
24+
"left": -277,
25+
"rotate": 270,
26+
"attrs": { "color": "red" }
27+
}
28+
],
29+
"connections": [
30+
[ "esp32:RX", "$serialMonitor:TX", "", [] ],
31+
[ "esp32:TX", "$serialMonitor:RX", "", [] ],
32+
[ "btn1:1.l", "esp32:0", "blue", [ "h-28.8", "v-57.6", "h-144", "v42.71" ] ],
33+
[ "btn1:2.r", "esp32:GND.1", "black", [ "h19.4", "v173", "h-269.2", "v-98.23" ] ],
34+
[ "esp32:GND.1", "led1:C", "black", [ "h-67.47", "v-167.51" ] ],
35+
[ "esp32:4", "led1:A", "green", [ "h0" ] ]
36+
],
37+
"dependencies": {}
38+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"version": 1,
3+
"author": "kubaandrysek",
4+
"editor": "wokwi",
5+
"parts": [
6+
{
7+
"type": "board-esp32-s3-devkitc-1",
8+
"id": "esp32",
9+
"top": -57.6,
10+
"left": -177.56,
11+
"attrs": {}
12+
},
13+
{
14+
"type": "wokwi-pushbutton",
15+
"id": "btn1",
16+
"top": 83,
17+
"left": 9.6,
18+
"attrs": { "color": "green" }
19+
},
20+
{
21+
"type": "wokwi-led",
22+
"id": "led1",
23+
"top": 66.4,
24+
"left": -257.8,
25+
"rotate": 270,
26+
"attrs": { "color": "red", "flip": "" }
27+
}
28+
],
29+
"connections": [
30+
[ "esp32:RX", "$serialMonitor:TX", "", [] ],
31+
[ "esp32:TX", "$serialMonitor:RX", "", [] ],
32+
[ "btn1:1.l", "esp32:0", "blue", [ "h-38.4", "v105.78" ] ],
33+
[ "btn1:2.r", "esp32:GND.3", "green", [ "h19.4", "v48.2", "h-144.4", "v0.18" ] ],
34+
[ "esp32:4", "led1:A", "green", [ "h0" ] ],
35+
[ "esp32:GND.1", "led1:C", "black", [ "h0" ] ]
36+
],
37+
"dependencies": {}
38+
}

0 commit comments

Comments
 (0)