Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use run.bat instead of "go tool dist test" on Windows #1564

Merged
merged 1 commit into from
Feb 17, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions eng/_util/cmd/build/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,17 +209,6 @@ func build(o *options) error {
}...,
)

// "src/run.bat" doesn't pass arguments through to "dist test" like "src/run.bash" does.
// This prevents "-json" from working properly: in "src/run.bat -json", "-json" is a no-op.
// So, use "dist test" directly, here. Some environment variables may be subtly different,
// but it appears to work fine for dev scenarios. https://github.com/microsoft/go/issues/109
if runtime.GOOS == "windows" {
testCommandLine = []string{
filepath.Join("..", "bin", "go"+executableExtension),
"tool", "dist", "test",
}
}

// "-json": Get test results as lines of JSON.
if o.JSON {
testCommandLine = append(testCommandLine, "-json")
Expand Down