Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(557)

Side by Side Diff: ct/go/worker_scripts/run_chromium_perf/main.go

Issue 1129863010: Reset chromium checkout before syncing (Closed) Base URL: https://skia.googlesource.com/buildbot@master
Patch Set: Initial upload Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ct/go/worker_scripts/run_benchmark/main.go ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // run_chromium_perf is an application that runs the specified benchmark over CT 's 1 // run_chromium_perf is an application that runs the specified benchmark over CT 's
2 // webpage archives. 2 // webpage archives.
3 package main 3 package main
4 4
5 import ( 5 import (
6 "encoding/csv" 6 "encoding/csv"
7 "flag" 7 "flag"
8 "fmt" 8 "fmt"
9 "io/ioutil" 9 "io/ioutil"
10 "os" 10 "os"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 } 58 }
59 if *runIDWithPatch == "" { 59 if *runIDWithPatch == "" {
60 glog.Error("Must specify --run_id_withpatch") 60 glog.Error("Must specify --run_id_withpatch")
61 return 61 return
62 } 62 }
63 if *benchmarkName == "" { 63 if *benchmarkName == "" {
64 glog.Error("Must specify --benchmark_name") 64 glog.Error("Must specify --benchmark_name")
65 return 65 return
66 } 66 }
67 67
68 // Reset the local chromium checkout.
69 if err := util.ResetCheckout(util.ChromiumSrcDir); err != nil {
70 glog.Errorf("Could not reset %s: %s", util.ChromiumSrcDir, err)
71 return
72 }
68 // Sync the local chromium checkout. 73 // Sync the local chromium checkout.
69 if err := util.SyncDir(util.ChromiumSrcDir); err != nil { 74 if err := util.SyncDir(util.ChromiumSrcDir); err != nil {
70 glog.Errorf("Could not gclient sync %s: %s", util.ChromiumSrcDir , err) 75 glog.Errorf("Could not gclient sync %s: %s", util.ChromiumSrcDir , err)
71 return 76 return
72 } 77 }
73 78
74 // Create the task file so that the master knows this worker is still bu sy. 79 // Create the task file so that the master knows this worker is still bu sy.
75 skutil.LogErr(util.CreateTaskFile(util.ACTIVITY_RUNNING_CHROMIUM_PERF)) 80 skutil.LogErr(util.CreateTaskFile(util.ACTIVITY_RUNNING_CHROMIUM_PERF))
76 defer util.DeleteTaskFile(util.ACTIVITY_RUNNING_CHROMIUM_PERF) 81 defer util.DeleteTaskFile(util.ACTIVITY_RUNNING_CHROMIUM_PERF)
77 82
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 } 324 }
320 writer := csv.NewWriter(csvFile) 325 writer := csv.NewWriter(csvFile)
321 defer writer.Flush() 326 defer writer.Flush()
322 for _, row := range [][]string{headers, values} { 327 for _, row := range [][]string{headers, values} {
323 if err := writer.Write(row); err != nil { 328 if err := writer.Write(row); err != nil {
324 return fmt.Errorf("Could not write to %s: %s", csvPath, err) 329 return fmt.Errorf("Could not write to %s: %s", csvPath, err)
325 } 330 }
326 } 331 }
327 return nil 332 return nil
328 } 333 }
OLDNEW
« no previous file with comments | « ct/go/worker_scripts/run_benchmark/main.go ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698