-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
Showing
3 changed files
with
17 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
"${GOEXE}" test -run="NONE" -bench="BenchmarkSiteBuilding/${1}$" -test.benchmem=true ./hugolib -memprofile mem.prof -cpuprofile cpu.prof |