Skip to content

Commit 4a98db4

Browse files
dkegel-fastlydeadprogram
authored andcommitted
Add regression test for #2666.
I didn't see how to run it easily from main_test.go, though I didn't try too hard. And it doesn't really have a good place to go in Makefile. So I added a new target tinygo-baremetal, and invoke it from CI at the end of assert-test-linux. It only adds 7 seconds to the run, should be ok.
1 parent c534fa1 commit 4a98db4

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

.github/workflows/linux.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,3 +239,4 @@ jobs:
239239
rm xtensa-esp32-elf-gcc8_2_0-esp-2020r2-linux-amd64.tar.gz
240240
- run: make smoketest
241241
- run: make wasmtest
242+
- run: make tinygo-baremetal

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,10 @@ test-corpus-fast:
331331
test-corpus-wasi: wasi-libc
332332
CGO_CPPFLAGS="$(CGO_CPPFLAGS)" CGO_CXXFLAGS="$(CGO_CXXFLAGS)" CGO_LDFLAGS="$(CGO_LDFLAGS)" $(GO) test $(GOTESTFLAGS) -timeout=1h -buildmode exe -tags byollvm -run TestCorpus . -corpus=testdata/corpus.yaml -target=wasi
333333

334+
tinygo-baremetal:
335+
# Regression tests that run on a baremetal target and don't fit in either main_test.go or smoketest.
336+
# regression test for #2666: e.g. encoding/hex must pass on baremetal
337+
$(TINYGO) test -target cortex-m-qemu encoding/hex
334338

335339
.PHONY: smoketest
336340
smoketest:

0 commit comments

Comments
 (0)