Skip to content

Commit 77f66fc

Browse files
committed
add hello world test
1 parent caef400 commit 77f66fc

File tree

4 files changed

+57
-0
lines changed

4 files changed

+57
-0
lines changed

.github/workflows/hil.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Run tests in hardware
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- master
8+
tags:
9+
10+
concurrency:
11+
group: build-${{ github.event.pull_request.number || github.ref }}
12+
cancel-in-progress: true
13+
14+
jobs:
15+
Build:
16+
name: Build
17+
runs-on: ubuntu-latest
18+
strategy:
19+
steps:
20+
- name: Checkout Repository
21+
uses: actions/checkout@v2
22+
23+
- name: Build sketches
24+
uses: ouss4/compile-sketches@cbfba7fd76bbd6987e75ecd9ec18d2c63615ca53
25+
with:
26+
fqbn: 'esp32:esp32:esp32'
27+
platforms: |
28+
- name: esp32:esp32
29+
source-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
30+
sketch-paths: |
31+
- tests/

tests/hello_world/hello_world.ino

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
void setup(){
2+
Serial.begin(115200);
3+
while (!Serial) {
4+
;
5+
}
6+
7+
Serial.println("Hello Arduino!");
8+
}
9+
10+
void loop(){
11+
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
def test_hello_arduino(dut):
2+
dut.expect('Hello Arduino!')

tests/pytest.ini

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[pytest]
2+
addopts = --embedded-services esp,arduino
3+
4+
# log related
5+
log_cli = True
6+
log_cli_level = INFO
7+
log_cli_format = %(asctime)s %(levelname)s %(message)s
8+
log_cli_date_format = %Y-%m-%d %H:%M:%S
9+
10+
log_file = test.log
11+
log_file_level = INFO
12+
log_file_format = %(asctime)s %(levelname)s %(message)s
13+
log_file_date_format = %Y-%m-%d %H:%M:%S

0 commit comments

Comments
 (0)