mirror of
https://github.com/tinygo-org/drivers.git
synced 2026-08-26 17:39:14 +00:00
test: run unit tests against i2c drivers and any spi drivers without direct gpio
Signed-off-by: deadprogram <ron@hybridgroup.com>
This commit is contained in:
@@ -12,6 +12,9 @@ jobs:
|
|||||||
- run:
|
- run:
|
||||||
name: "Enforce Go Formatted Code"
|
name: "Enforce Go Formatted Code"
|
||||||
command: make fmt-check
|
command: make fmt-check
|
||||||
|
- run:
|
||||||
|
name: "Run unit tests"
|
||||||
|
command: make unit-test
|
||||||
- run:
|
- run:
|
||||||
name: "Run build and smoke tests"
|
name: "Run build and smoke tests"
|
||||||
command: make smoke-test
|
command: make smoke-test
|
||||||
|
|||||||
@@ -160,4 +160,13 @@ endif
|
|||||||
tinygo build -size short -o ./build/test.hex -target=circuitplay-express ./examples/lis2mdl/main.go
|
tinygo build -size short -o ./build/test.hex -target=circuitplay-express ./examples/lis2mdl/main.go
|
||||||
@md5sum ./build/test.hex
|
@md5sum ./build/test.hex
|
||||||
|
|
||||||
test: clean fmt-check smoke-test
|
DRIVERS = $(wildcard */)
|
||||||
|
NOTESTS = build examples flash semihosting pcd8544 shiftregister st7789 microphone mcp3008 gps microbitmatrix \
|
||||||
|
hcsr04 ssd1331 ws2812 thermistor apa102 easystepper ssd1351 ili9341 wifinina shifter hub75 \
|
||||||
|
hd44780 buzzer ssd1306 espat l9110x st7735 bmi160 l293x
|
||||||
|
TESTS = $(filter-out $(addsuffix /%,$(NOTESTS)),$(DRIVERS))
|
||||||
|
|
||||||
|
unit-test:
|
||||||
|
@go test -v $(addprefix ./,$(TESTS))
|
||||||
|
|
||||||
|
test: clean fmt-check unit-test smoke-test
|
||||||
|
|||||||
Reference in New Issue
Block a user