Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
cmd/go: go test -buildmode=plugin #18814
Over on #18729 I am finding bugs by taking existing package unit tests and converting them into plugins that shell unit test can then call.
This is a bit messy to do outside of the go tool, as it requires messing with the definition of a package (including export_test.go, exporting the test functions, etc). It would be relatively straightforward to do inside the go tool, and we already have the flags we would need to trigger it.
Then we could have a builder that runs all the tests under plugins, which would exercise the multi-module code paths in the runtime package used by -buildmode=shared and -buildmode=plugin.