Skip to content

Commit b43bff7

Browse files
committed
Merge branch 'floitsch/run-hw-tests.25.board12' into floitsch/run-hw-tests.30.ci-esp32
2 parents eb8963c + 2fbe625 commit b43bff7

File tree

4 files changed

+20
-10
lines changed

4 files changed

+20
-10
lines changed

Makefile

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -306,17 +306,27 @@ install: install-sdk
306306
test:
307307
(cd $(BUILD)/$(HOST) && ninja check_slow check_fuzzer_lib)
308308

309-
.PHONY: test-hw
310-
test-hw:
309+
.PHONY: rebuild-cmake-hw
310+
rebuild-cmake-hw:
311311
@if [ -z "$$TOIT_EXE_HW" ]; then \
312312
echo "TOIT_EXE_HW is not set."; \
313313
exit 1; \
314314
fi
315315
mkdir -p $(BUILD)/hw
316316
(cd $(BUILD)/hw && cmake -DTOIT_EXE_HW=$$TOIT_EXE_HW -G Ninja $(CURDIR)/tests/hw)
317+
318+
.PHONY: download-packages-hw-host
319+
download-packages-hw-host:
320+
cmake -E env TOIT_EXE_HW=$(BUILD)/$(HOST)/sdk/bin/toit $(MAKE) download-packages-hw
321+
322+
.PHONY: download-packages-hw
323+
download-packages-hw:
317324
$$TOIT_EXE_HW pkg install --project-root tests/hw/pi
318325
$$TOIT_EXE_HW pkg install --project-root tests/hw/esp32
319326
$$TOIT_EXE_HW pkg install --project-root tests/hw/esp-tester
327+
328+
.PHONY: test-hw
329+
test-hw: rebuild-cmake-hw download-packages-hw
320330
(cd $(BUILD)/hw && ninja check_hw)
321331

322332
.PHONY: build-test-assets
@@ -340,12 +350,12 @@ update-gold:
340350
(cd $(BUILD)/$(HOST) && ninja update_type_gold)
341351

342352
.PHONY: test-health
343-
test-health: download-packages
353+
test-health: download-packages download-packages-hw-host
344354
$(MAKE) rebuild-cmake
345355
(cd $(BUILD)/$(HOST) && ninja check_health)
346356

347357
.PHONY: update-health-gold
348-
update-health-gold: download-packages
358+
update-health-gold: download-packages download-packages-hw-host
349359
$(MAKE) rebuild-cmake
350360
(cd $(BUILD)/$(HOST) && ninja clear_health_gold)
351361
(cd $(BUILD)/$(HOST) && ninja update_health_gold)

tests/hw/esp-tester/mini-jag.toit

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ import net
88
import system.containers
99
import uuid show Uuid
1010

11+
import .shared
12+
1113
main:
1214
cause := esp32.wakeup-cause
1315
print "Wakeup cause: $cause"
@@ -28,7 +30,7 @@ install-new-test:
2830
network := net.open
2931
server-socket := network.tcp-listen 0
3032
print "$network.address:$server-socket.local-address.port"
31-
print "MINI-JAG LISTENING"
33+
print MINI-JAG-LISTENING
3234
socket := server-socket.accept
3335
reader := socket.in
3436
size := reader.little-endian.read-int32

tests/hw/esp-tester/tester.toit

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@ import system
1414
import uart
1515
import .shared
1616

17-
MINI-JAG-LISTENING ::= "MINI-JAG LISTENING"
18-
TEST-STARTED ::= "TEST STARTED"
19-
ALL-TEST-DONE ::= "All tests done"
17+
ALL-TESTS-DONE ::= "All tests done"
2018
JAG-DECODE ::= "jag decode"
2119

2220
main args:
@@ -144,7 +142,7 @@ class TestDevice:
144142
collected-output += data.to-string-non-throwing
145143
if not ready-latch.has-value and collected-output.contains "\n$MINI-JAG-LISTENING":
146144
ready-latch.set true
147-
if not all-tests-done.has-value and collected-output.contains ALL-TEST-DONE:
145+
if not all-tests-done.has-value and collected-output.contains ALL-TESTS-DONE:
148146
all-tests-done.set true
149147
if collected-output.contains JAG-DECODE:
150148
ui.abort "Error detected"

tests/hw/esp32/uart-rs485-board2.toit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ test:
4040
task --background::
4141
sleep --ms=2000
4242
print "Timeout"
43-
print "Board1 must be started before board1"
43+
print "Board1 must be started before board2."
4444

4545
task::
4646
5.repeat:

0 commit comments

Comments
 (0)