From 4a98db4c8600267546504a926ca8c5537bb725e3 Mon Sep 17 00:00:00 2001 From: Dan Kegel Date: Mon, 14 Mar 2022 09:22:28 -0700 Subject: [PATCH] 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. --- .github/workflows/linux.yml | 1 + Makefile | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 661bdc56..20e45fc8 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -239,3 +239,4 @@ jobs: rm xtensa-esp32-elf-gcc8_2_0-esp-2020r2-linux-amd64.tar.gz - run: make smoketest - run: make wasmtest + - run: make tinygo-baremetal diff --git a/Makefile b/Makefile index 392c7c78..741bb49f 100644 --- a/Makefile +++ b/Makefile @@ -331,6 +331,10 @@ test-corpus-fast: test-corpus-wasi: wasi-libc 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 +tinygo-baremetal: + # Regression tests that run on a baremetal target and don't fit in either main_test.go or smoketest. + # regression test for #2666: e.g. encoding/hex must pass on baremetal + $(TINYGO) test -target cortex-m-qemu encoding/hex .PHONY: smoketest smoketest: