NeedsGoBuild skips t if the current system can't build programs with “go build” and then run them with os.StartProcess or exec.Command. Android doesn't have the userspace go build needs to run, and js/wasm doesn't support running subprocesses.
(t testing.TB)
| 274 | // Android doesn't have the userspace go build needs to run, |
| 275 | // and js/wasm doesn't support running subprocesses. |
| 276 | func NeedsGoBuild(t testing.TB) { |
| 277 | t.Helper() |
| 278 | |
| 279 | // This logic was derived from internal/testing.HasGoBuild and |
| 280 | // may need to be updated as that function evolves. |
| 281 | |
| 282 | NeedsTool(t, "go") |
| 283 | } |
| 284 | |
| 285 | // NeedsDefaultImporter skips t if the test uses the default importer, |
| 286 | // returned by [go/importer.Default]. |
searching dependent graphs…