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.
Этот коммит содержится в:
Dan Kegel 2022-06-04 10:47:51 -07:00 коммит произвёл Ron Evans
родитель a07287d3c6
коммит ada11090a2
3 изменённых файлов: 14 добавлений и 0 удалений

Просмотреть файл

@ -377,6 +377,8 @@ tinygo-baremetal:
.PHONY: smoketest .PHONY: smoketest
smoketest: smoketest:
$(TINYGO) version $(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 # compile-only platform-independent examples
cd tests/text/template/smoke && $(TINYGO) test -c && rm -f smoke.test cd tests/text/template/smoke && $(TINYGO) test -c && rm -f smoke.test
# regression test for #2563 # regression test for #2563

Просмотреть файл

@ -0,0 +1,6 @@
package subdir
import "testing"
func TestSubdir(t *testing.T) {
}

6
tests/testing/recurse/top_test.go Обычный файл
Просмотреть файл

@ -0,0 +1,6 @@
package top
import "testing"
func TestTop(t *testing.T) {
}