Add windows support for benchmark (#105)

Benchmark on windows requires a .exe extension for garble
pull/106/head
pagran 5 years ago committed by GitHub
parent 85fdc4a3a0
commit 0d72fa229d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -8,6 +8,7 @@ import (
"os"
"os/exec"
"path/filepath"
"runtime"
"sync/atomic"
"testing"
)
@ -29,6 +30,10 @@ func BenchmarkBuild(b *testing.B) {
defer os.RemoveAll(tdir)
garbleBin := filepath.Join(tdir, "garble")
if runtime.GOOS == "windows" {
garbleBin += ".exe"
}
if err := exec.Command("go", "build", "-o="+garbleBin).Run(); err != nil {
b.Fatalf("building garble: %v", err)
}

Loading…
Cancel
Save