[CTFE] RunOnGCE fix
Bug: skia:8771
Change-Id: I685128ae206e2526c2a6f9f5672d7d2244e35dab
Reviewed-on: https://skia-review.googlesource.com/c/buildbot/+/199480
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Ravi Mistry <rmistry@google.com>
diff --git a/ct/go/ctfe/chromium_perf/chromium_perf.go b/ct/go/ctfe/chromium_perf/chromium_perf.go
index 6e2e68e..4cbc7aa 100644
--- a/ct/go/ctfe/chromium_perf/chromium_perf.go
+++ b/ct/go/ctfe/chromium_perf/chromium_perf.go
@@ -80,7 +80,7 @@
taskVars.RepeatAfterDays = strconv.FormatInt(task.RepeatAfterDays, 10)
taskVars.Benchmark = task.Benchmark
taskVars.Platform = task.Platform
- taskVars.RunOnGCE = task.RunOnGCE
+ taskVars.RunOnGCE = strconv.FormatBool(task.RunOnGCE)
taskVars.PageSets = task.PageSets
taskVars.RepeatRuns = strconv.FormatInt(task.RepeatRuns, 10)
taskVars.RunInParallel = strconv.FormatBool(task.RunInParallel)
@@ -176,7 +176,7 @@
Benchmark string `json:"benchmark"`
Platform string `json:"platform"`
- RunOnGCE bool `json:"run_on_gce"`
+ RunOnGCE string `json:"run_on_gce"`
PageSets string `json:"page_sets"`
CustomWebpages string `json:"custom_webpages"`
RepeatRuns string `json:"repeat_runs"`
@@ -252,7 +252,6 @@
t := &DatastoreTask{
Benchmark: task.Benchmark,
Platform: task.Platform,
- RunOnGCE: task.RunOnGCE,
PageSets: task.PageSets,
IsTestPageSet: task.PageSets == ctutil.PAGESET_TYPE_DUMMY_1k,
BenchmarkArgs: task.BenchmarkArgs,
@@ -270,6 +269,11 @@
BenchmarkPatchGSPath: benchmarkPatchGSPath,
V8PatchGSPath: v8PatchGSPath,
}
+ runOnGCE, err := strconv.ParseBool(task.RunOnGCE)
+ if err != nil {
+ return nil, fmt.Errorf("%s is not bool: %s", task.RunOnGCE, err)
+ }
+ t.RunOnGCE = runOnGCE
runInParallel, err := strconv.ParseBool(task.RunInParallel)
if err != nil {
return nil, fmt.Errorf("%s is not bool: %s", task.RunInParallel, err)