summaryrefslogtreecommitdiffstats
path: root/benchSite.sh
diff options
context:
space:
mode:
authorMichael Henderson <mdhender@mdhender.com>2017-07-15 15:18:38 -0600
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2017-07-16 00:35:15 +0200
commitea5e9e346c93320538c6517b619b5f57473291c8 (patch)
treeb3645b40b7341ff1f7ab8cc7cfb18a9a54bfa225 /benchSite.sh
parent61bb3ccab3a552c4b80ffb5370714598660b7b37 (diff)
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-xbenchSite.sh5
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