dashboard: add commit-only mode
Also add a added=true addition that I seemed to think was previously missing. Breaking this out of previous big CL. LGTM=adg R=adg CC=golang-codereviews https://golang.org/cl/146080043
This commit is contained in:
parent
74021b4175
commit
f123f00fbc
|
|
@ -61,6 +61,7 @@ var (
|
||||||
buildTimeout = flag.Duration("buildTimeout", 60*time.Minute, "Maximum time to wait for builds and tests")
|
buildTimeout = flag.Duration("buildTimeout", 60*time.Minute, "Maximum time to wait for builds and tests")
|
||||||
cmdTimeout = flag.Duration("cmdTimeout", 10*time.Minute, "Maximum time to wait for an external command")
|
cmdTimeout = flag.Duration("cmdTimeout", 10*time.Minute, "Maximum time to wait for an external command")
|
||||||
commitInterval = flag.Duration("commitInterval", 1*time.Minute, "Time to wait between polling for new commits (0 disables commit poller)")
|
commitInterval = flag.Duration("commitInterval", 1*time.Minute, "Time to wait between polling for new commits (0 disables commit poller)")
|
||||||
|
commitOnly = flag.Bool("commitWatchOnly", false, "only run the commit watch loop and don't do any builds")
|
||||||
benchNum = flag.Int("benchnum", 5, "Run each benchmark that many times")
|
benchNum = flag.Int("benchnum", 5, "Run each benchmark that many times")
|
||||||
benchTime = flag.Duration("benchtime", 5*time.Second, "Benchmarking time for a single benchmark run")
|
benchTime = flag.Duration("benchtime", 5*time.Second, "Benchmarking time for a single benchmark run")
|
||||||
benchMem = flag.Int("benchmem", 64, "Approx RSS value to aim at in benchmarks, in MB")
|
benchMem = flag.Int("benchmem", 64, "Approx RSS value to aim at in benchmarks, in MB")
|
||||||
|
|
@ -127,7 +128,7 @@ func main() {
|
||||||
os.Exit(2)
|
os.Exit(2)
|
||||||
}
|
}
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
if len(flag.Args()) == 0 {
|
if len(flag.Args()) == 0 && !*commitOnly {
|
||||||
flag.Usage()
|
flag.Usage()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -214,6 +215,9 @@ func main() {
|
||||||
|
|
||||||
// Start commit watcher
|
// Start commit watcher
|
||||||
go commitWatcher(goroot)
|
go commitWatcher(goroot)
|
||||||
|
if *commitOnly {
|
||||||
|
select {}
|
||||||
|
}
|
||||||
|
|
||||||
// go continuous build mode
|
// go continuous build mode
|
||||||
// check for new commits and build them
|
// check for new commits and build them
|
||||||
|
|
@ -766,6 +770,7 @@ func addCommit(pkg, hash, key string) bool {
|
||||||
log.Printf("failed to add %s to dashboard: %v", hash, err)
|
log.Printf("failed to add %s to dashboard: %v", hash, err)
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
l.added = true
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue