diff --git a/main.go b/main.go index e6fc92c1..1f34add3 100644 --- a/main.go +++ b/main.go @@ -947,10 +947,11 @@ func main() { wasmAbi := flag.String("wasm-abi", "", "WebAssembly ABI conventions: js (no i64 params) or generic") llvmFeatures := flag.String("llvm-features", "", "comma separated LLVM features to enable") - var flagJSON, flagDeps *bool + var flagJSON, flagDeps, flagTest *bool if command == "help" || command == "list" { flagJSON = flag.Bool("json", false, "print data in JSON format") - flagDeps = flag.Bool("deps", false, "") + flagDeps = flag.Bool("deps", false, "supply -deps flag to go list") + flagTest = flag.Bool("test", false, "supply -test flag to go list") } var outpath string if command == "help" || command == "build" || command == "build-library" || command == "test" { @@ -1200,6 +1201,9 @@ func main() { if *flagDeps { extraArgs = append(extraArgs, "-deps") } + if *flagTest { + extraArgs = append(extraArgs, "-test") + } cmd, err := loader.List(config, extraArgs, flag.Args()) if err != nil { fmt.Fprintln(os.Stderr, "failed to run `go list`:", err)