From ada11090a2d79fbbf2d5da3f1ab84be688b51e00 Mon Sep 17 00:00:00 2001 From: Dan Kegel Date: Sat, 4 Jun 2022 10:47:51 -0700 Subject: [PATCH] smoketest: add regression test for 'tinygo test ./...', see #2892 tests/testing/recurse has two directories with tests; "make smoketest" now does "tinygo test ./..." in that directory and fails if it does not run both directories' tests. --- Makefile | 2 ++ tests/testing/recurse/subdir/subdir_test.go | 6 ++++++ tests/testing/recurse/top_test.go | 6 ++++++ 3 files changed, 14 insertions(+) create mode 100644 tests/testing/recurse/subdir/subdir_test.go create mode 100644 tests/testing/recurse/top_test.go diff --git a/Makefile b/Makefile index 3610348e..bb351978 100644 --- a/Makefile +++ b/Makefile @@ -377,6 +377,8 @@ tinygo-baremetal: .PHONY: smoketest smoketest: $(TINYGO) version + # regression test for #2892 + cd tests/testing/recurse && ($(TINYGO) test ./... > recurse.log && cat recurse.log && test $$(wc -l < recurse.log) = 2 && rm recurse.log) # compile-only platform-independent examples cd tests/text/template/smoke && $(TINYGO) test -c && rm -f smoke.test # regression test for #2563 diff --git a/tests/testing/recurse/subdir/subdir_test.go b/tests/testing/recurse/subdir/subdir_test.go new file mode 100644 index 00000000..68599804 --- /dev/null +++ b/tests/testing/recurse/subdir/subdir_test.go @@ -0,0 +1,6 @@ +package subdir + +import "testing" + +func TestSubdir(t *testing.T) { +} diff --git a/tests/testing/recurse/top_test.go b/tests/testing/recurse/top_test.go new file mode 100644 index 00000000..5c929dcf --- /dev/null +++ b/tests/testing/recurse/top_test.go @@ -0,0 +1,6 @@ +package top + +import "testing" + +func TestTop(t *testing.T) { +}