Run benchmarks when running tests

This commit is contained in:
Jakob Borg
2015-05-23 15:08:17 +02:00
parent a2b94f4e06
commit 8dd7e4e6b5
6 changed files with 115 additions and 95 deletions

View File

@@ -110,6 +110,9 @@ func main() {
case "test":
test("./...")
case "bench":
bench("./...")
case "assets":
assets()
@@ -182,6 +185,11 @@ func test(pkg string) {
runPrint("go", "test", "-short", "-timeout", "60s", pkg)
}
func bench(pkg string) {
setBuildEnv()
runPrint("go", "test", "-run", "NONE", "-bench", ".", pkg)
}
func install(pkg string, tags []string) {
os.Setenv("GOBIN", "./bin")
args := []string{"install", "-v", "-ldflags", ldflags()}