diff options
author | Michael Henderson <[email protected]> | 2017-07-15 15:18:38 -0600 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2017-07-16 00:35:15 +0200 |
commit | ea5e9e346c93320538c6517b619b5f57473291c8 (patch) | |
tree | b3645b40b7341ff1f7ab8cc7cfb18a9a54bfa225 /bench.sh | |
parent | 61bb3ccab3a552c4b80ffb5370714598660b7b37 (diff) | |
download | hugo-ea5e9e346c93320538c6517b619b5f57473291c8.tar.gz hugo-ea5e9e346c93320538c6517b619b5f57473291c8.zip |
Add GOEXE to support building with different versions of `go`
Add a variable to the makefile and benchmark scripts to let users change the command used to build. Doesn't impact tools like govendor.
Diffstat (limited to 'bench.sh')
-rwxr-xr-x | bench.sh | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -1,5 +1,7 @@ #!/usr/bin/env bash +# allow user to override go executable by running as GOEXE=xxx make ... +GOEXE="${GOEXE-go}" # Convenience script to # - For a given branch @@ -26,10 +28,10 @@ BRANCH=$1 PACKAGE=$2 git checkout $BRANCH -go test -test.run=NONE -bench="$benchFilter" -test.benchmem=true ./$PACKAGE > /tmp/bench-$PACKAGE-$BRANCH.txt +"${GOEXE}" test -test.run=NONE -bench="$benchFilter" -test.benchmem=true ./$PACKAGE > /tmp/bench-$PACKAGE-$BRANCH.txt git checkout master -go test -test.run=NONE -bench="$benchFilter" -test.benchmem=true ./$PACKAGE > /tmp/bench-$PACKAGE-master.txt +"${GOEXE}" test -test.run=NONE -bench="$benchFilter" -test.benchmem=true ./$PACKAGE > /tmp/bench-$PACKAGE-master.txt -benchcmp /tmp/bench-$PACKAGE-master.txt /tmp/bench-$PACKAGE-$BRANCH.txt
\ No newline at end of file +benchcmp /tmp/bench-$PACKAGE-master.txt /tmp/bench-$PACKAGE-$BRANCH.txt |