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

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

Issue 1872763002: [CT] Split benchmarkArgs around one or more consecutive white spaces (Closed) Base URL: https://skia.googlesource.com/buildbot@master
Patch Set: Initial upload Created 4 years, 8 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 | « no previous file | ct/go/worker_scripts/run_chromium_perf/main.go » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // fix_archives is an application that validates the webpage archives of a 1 // fix_archives is an application that validates the webpage archives of a
2 // pageset type and deletes the archives which are found to deliver 2 // pageset type and deletes the archives which are found to deliver
3 // inconsistent benchmark results. 3 // inconsistent benchmark results.
4 // See https://code.google.com/p/chromium/issues/detail?id=456883 for more 4 // See https://code.google.com/p/chromium/issues/detail?id=456883 for more
5 // details. 5 // details.
6 package main 6 package main
7 7
8 import ( 8 import (
9 "encoding/csv" 9 "encoding/csv"
10 "flag" 10 "flag"
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 "--page-set-base-dir=" + pathToPagesets, 156 "--page-set-base-dir=" + pathToPagesets,
157 "--also-run-disabled-tests", 157 "--also-run-disabled-tests",
158 } 158 }
159 // Add output dir. 159 // Add output dir.
160 outputDirArgValue := filepath.Join(localOutputDir, pages etName, strconv.Itoa(repeatNum)) 160 outputDirArgValue := filepath.Join(localOutputDir, pages etName, strconv.Itoa(repeatNum))
161 args = append(args, "--output-dir="+outputDirArgValue) 161 args = append(args, "--output-dir="+outputDirArgValue)
162 // Figure out which browser should be used. 162 // Figure out which browser should be used.
163 args = append(args, "--browser=exact", "--browser-execut able="+chromiumBinary) 163 args = append(args, "--browser=exact", "--browser-execut able="+chromiumBinary)
164 // Split benchmark args if not empty and append to args. 164 // Split benchmark args if not empty and append to args.
165 if *benchmarkArgs != "" { 165 if *benchmarkArgs != "" {
166 » » » » for _, benchmarkArg := range strings.Split(*benc hmarkArgs, " ") { 166 » » » » for _, benchmarkArg := range strings.Fields(*ben chmarkArgs) {
167 args = append(args, benchmarkArg) 167 args = append(args, benchmarkArg)
168 } 168 }
169 } 169 }
170 // Add browserArgs if not empty to args. 170 // Add browserArgs if not empty to args.
171 if *browserArgs != "" { 171 if *browserArgs != "" {
172 args = append(args, "--extra-browser-args="+*bro wserArgs) 172 args = append(args, "--extra-browser-args="+*bro wserArgs)
173 } 173 }
174 // Set the PYTHONPATH to the pagesets and the telemetry dirs. 174 // Set the PYTHONPATH to the pagesets and the telemetry dirs.
175 env := []string{ 175 env := []string{
176 fmt.Sprintf("PYTHONPATH=%s:%s:%s:%s:$PYTHONPATH" , pathToPagesets, util.TelemetryBinariesDir, util.TelemetrySrcDir, util.Catapult SrcDir), 176 fmt.Sprintf("PYTHONPATH=%s:%s:%s:%s:$PYTHONPATH" , pathToPagesets, util.TelemetryBinariesDir, util.TelemetrySrcDir, util.Catapult SrcDir),
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 reader.FieldsPerRecord = -1 273 reader.FieldsPerRecord = -1
274 rawCSVdata, err := reader.ReadAll() 274 rawCSVdata, err := reader.ReadAll()
275 if err != nil { 275 if err != nil {
276 return nil, nil, fmt.Errorf("Could not read %s: %s", csvPath, er r) 276 return nil, nil, fmt.Errorf("Could not read %s: %s", csvPath, er r)
277 } 277 }
278 if len(rawCSVdata) != 2 { 278 if len(rawCSVdata) != 2 {
279 return nil, nil, fmt.Errorf("No data in %s", csvPath) 279 return nil, nil, fmt.Errorf("No data in %s", csvPath)
280 } 280 }
281 return rawCSVdata[0], rawCSVdata[1], nil 281 return rawCSVdata[0], rawCSVdata[1], nil
282 } 282 }
OLDNEW
« no previous file with comments | « no previous file | ct/go/worker_scripts/run_chromium_perf/main.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698