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

testserver: use glibc binary on systems with eglibc #31

Merged
merged 1 commit into from
May 3, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions testserver/binaries.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func downloadFile(response *http.Response, filePath string) error {
return os.Chmod(filePath, finishedFileMode)
}

var glibcRE = regexp.MustCompile(`(?i)\bglibc\b`)
var muslRE = regexp.MustCompile(`(?i)\bmusl\b`)

func downloadLatestBinary() (string, error) {
goos := runtime.GOOS
Expand All @@ -50,10 +50,10 @@ func downloadLatestBinary() (string, error) {
out, err := cmd.Output()
if err != nil {
log.Printf("%s: out=%q err=%s", cmd.Args, out, err)
} else if glibcRE.Match(out) {
return "-gnu"
} else if muslRE.Match(out) {
return "-musl"
}
return "-musl"
return "-gnu"
}()
}
binaryName := fmt.Sprintf("cockroach.%s-%s", goos, runtime.GOARCH)
Expand Down