Repository navigation
ci: run all test packages on Windows and macOS - #5879
davecheney wants to merge 1 commit into
Conversation
|
I spotted this one as part of #5872. The net result was several packages were not tested on macOS and windows, and there were a few bugs, mainly around file path handling that crept in. I've restored the test runner to use -short as the synonym for "skip long tests", as this is known to go test and is safe to use when testing multiple packages. I've also fixed the failing tests and hardened them a little by using the newer testing.TB helpers. |
1be6111 to
4bebb02
Compare
deadprogram
left a comment
There was a problem hiding this comment.
Thanks for tracking this down @davecheney! Good catch on the flag ending the package list. The following is edited from an automated review:
-
-shortskips more than-only-current-osdid.TestTestonly adds the EmulatedCortexM3, EmulatedRISCV, WASM and WASI targets whentesting.Short()is false, andTestWASIPanicTracebackskips in short mode. The macOS job installs qemu and the Windows job installs wasmtime, so those subtests did run there before this change and now they do not. Maybe that is fine given the Linux job still runs them, but should we note it in the commit message? Or keep them by using an environment variable instead of a flag? -
The commit message only talks about the CI change. Perhaps add a line or two on the test fixes that came along with it, such as the
loader.ListPWD fix for symlinked dirs like/varon macOS, the absolute path case inTestSizeFull, and the newwasm-toolscheck inemuCheck? -
TestSizeFullpassed on Linux only by chance, since/home/runner/work/tinygo/tinygo/lib/nrfx/mdkhappens to match^[a-z/]+$. The new check covers that too, so it is more correct now. Should the comment mention that it also explains why Linux was passing? -
The
emuCheckwasm-tools check only looks atspec.WITPackageandspec.WITWorld, while the build also honorsOptions.WITPackageandOptions.WITWorld. No test sets those today, so it is fine as is. Just mentioning it in case that changes.
What do you think of all this? Thanks again for working on it.
|
@deadprogram you're right, this PR is a hot mess. Let me pull it apart some, merge the various test fixes, then rebase this PR to make it smaller. |
8502c2e to
67f297a
Compare
67f297a to
1bd2f61
Compare
The Windows and macOS workflows put the custom -only-current-os flag before the package list. go test does not know this flag, so these jobs tested only the root package. The builder, cgo, compileopts, compiler, interp, loader, and transform packages did not run. Use the standard -short flag in these workflows. go test knows this flag and tests all eight packages, as on Linux. In TestBuild, -short now skips only the cross-target cases. Linux CI runs these cases, so other hosts do not need to run them again. The host-specific cases, such as Windows386, continue to run in short mode. Remove the -only-current-os flag because nothing uses it now. Remove the wasmtime install from the Windows test job because short mode does not use it. The macOS test job keeps qemu because TestBuild/opt=0-gc-cortex-m-qemu runs in short mode. Local make test continues to run all tests because GOTESTFLAGS is empty by default.
1bd2f61 to
4495826
Compare
|
Thanks for the review. I split the PR up and changed the approach for point 1.
On Windows CI, the PR now tests all eight packages. On |
|
Thanks for splitting this up @davecheney, it is much easier to follow now. I compared the CI logs against
|
Thanks for the second review. Let me take another swing at this tomorrow |
The Windows and macOS workflows put the custom
-only-current-osflag inGOTESTFLAGSbefore the package list. Go stops parsing packages at an unknown flag, so these jobs ran only the root package tests. Thebuilder,cgo,compileopts,compiler,interp,loader, andtransformpackages were not tested.Use the standard
-shortflag in these two workflows. Go recognizes this flag and processes the complete package list. Localmake testdoes not change becauseGOTESTFLAGSis empty by default.Short-mode coverage
In
TestBuild,-shortnow skips only the cross-target cases (EmulatedCortexM3, EmulatedRISCV, AVR, WebAssembly, WASIp1, and WASIp2). Linux CI runs these cases without-short, so other hosts do not need to run them again. The host-specific cases, such asWindows386, continue to run in short mode.TestWASIPanicTracebackand the cross-target cases inTestTestalso skip in short mode.The
-only-current-osflag is removed because nothing uses it now.Workflow dependencies
The Windows test job no longer installs wasmtime because short mode does not use it. The macOS test job keeps qemu because
TestBuild/opt=0-gc-cortex-m-qemuruns in short mode.Prerequisites
All three prerequisites are merged:
go list.