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 /benchSite.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 'benchSite.sh')
-rwxr-xr-x | benchSite.sh | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/benchSite.sh b/benchSite.sh index 8130559f5..fd088a5ec 100755 --- a/benchSite.sh +++ b/benchSite.sh @@ -1,9 +1,12 @@ #!/bin/bash +# allow user to override go executable by running as GOEXE=xxx make ... +GOEXE="${GOEXE-go}" + # Send in a regexp mathing the benchmarks you want to run, i.e. './benchSite.sh "YAML"'. # Note the quotes, which will be needed for more complex expressions. # The above will run all variations, but only for front matter YAML. echo "Running with BenchmarkSiteBuilding/${1}" -go test -run="NONE" -bench="BenchmarkSiteBuilding/${1}$" -test.benchmem=true ./hugolib -memprofile mem.prof -cpuprofile cpu.prof
\ No newline at end of file +"${GOEXE}" test -run="NONE" -bench="BenchmarkSiteBuilding/${1}$" -test.benchmem=true ./hugolib -memprofile mem.prof -cpuprofile cpu.prof |