Add test command to tinygo (#243)

* Add test command to tinygo
This commit is contained in:
Carolyn Van Slyck
2019-06-18 03:23:59 -07:00
committed by Ron Evans
parent a3d1f1a514
commit 208e1719ad
9 changed files with 288 additions and 13 deletions
+4
View File
@@ -38,6 +38,7 @@ fmt:
fmt-check:
@unformatted=$$(gofmt -l $(FMT_PATHS)); [ -z "$$unformatted" ] && exit 0; echo "Unformatted:"; for fn in $$unformatted; do echo " $$fn"; done; exit 1
gen-device: gen-device-avr gen-device-nrf gen-device-sam gen-device-stm32
gen-device-avr:
@@ -85,6 +86,9 @@ build/tinygo:
test:
CGO_CPPFLAGS="$(CGO_CPPFLAGS)" CGO_CXXFLAGS="$(CGO_CXXFLAGS)" CGO_LDFLAGS="$(CGO_LDFLAGS)" go test -v -tags byollvm .
tinygo-test:
cd tests/tinygotest && tinygo test
.PHONY: smoketest smoketest-no-avr
smoketest: smoketest-no-avr
tinygo build -size short -o test.elf -target=arduino examples/blinky1