зеркало из https://github.com/golang/build.git
dashboard/builder: finish the previous -report=false change
We weren't using the *report flag enough. LGTM=proppy R=proppy CC=golang-codereviews https://golang.org/cl/132650043
This commit is contained in:
Родитель
793c129aba
Коммит
ba24ef5286
|
@ -123,6 +123,9 @@ func (b *Builder) todo(kinds []string, pkg, goHash string) (kind, rev string, be
|
|||
|
||||
// recordResult sends build results to the dashboard
|
||||
func (b *Builder) recordResult(ok bool, pkg, hash, goHash, buildLog string, runTime time.Duration) error {
|
||||
if !*report {
|
||||
return nil
|
||||
}
|
||||
req := obj{
|
||||
"Builder": b.name,
|
||||
"PackagePath": pkg,
|
||||
|
@ -158,12 +161,18 @@ type PerfArtifact struct {
|
|||
|
||||
// recordPerfResult sends benchmarking results to the dashboard
|
||||
func (b *Builder) recordPerfResult(req *PerfResult) error {
|
||||
if !*report {
|
||||
return nil
|
||||
}
|
||||
req.Builder = b.name
|
||||
args := url.Values{"key": {b.key}, "builder": {b.name}}
|
||||
return dash("POST", "perf-result", args, req, nil)
|
||||
}
|
||||
|
||||
func postCommit(key, pkg string, l *HgLog) error {
|
||||
if !*report {
|
||||
return nil
|
||||
}
|
||||
t, err := time.Parse(time.RFC3339, l.Date)
|
||||
if err != nil {
|
||||
return fmt.Errorf("parsing %q: %v", l.Date, t)
|
||||
|
|
|
@ -625,7 +625,11 @@ func isFile(name string) bool {
|
|||
// commitWatcher polls hg for new commits and tells the dashboard about them.
|
||||
func commitWatcher(goroot *Repo) {
|
||||
if *commitInterval == 0 {
|
||||
log.Printf("commitInterval is %s, disabling commitWatcher", *commitInterval)
|
||||
log.Printf("commitInterval is 0; disabling commitWatcher")
|
||||
return
|
||||
}
|
||||
if !*report {
|
||||
log.Printf("-report is false; disabling commitWatcher")
|
||||
return
|
||||
}
|
||||
// Create builder just to get master key.
|
||||
|
|
Загрузка…
Ссылка в новой задаче