aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Eric Boren <borenet@google.com>2017-02-07 09:16:30 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-02-07 14:48:42 +0000
commit1f8be689173bde68802a9ff53d9565b21805b854 (patch)
treee83e38c3ed7152afee85116e118a499f5e17e502
parent67386d44c77a1bef1cd9a896d779bd92ea03a558 (diff)
gen_tasks.go: Add --builder_name_schema flag
BUG=skia:6070 Change-Id: I66ac3057f7863f822445d5163e54ca3b11755068 Reviewed-on: https://skia-review.googlesource.com/8107 Reviewed-by: Eric Boren <borenet@google.com> Reviewed-by: Ravi Mistry <rmistry@google.com> Commit-Queue: Eric Boren <borenet@google.com>
-rw-r--r--infra/bots/gen_tasks.go16
1 files changed, 10 insertions, 6 deletions
diff --git a/infra/bots/gen_tasks.go b/infra/bots/gen_tasks.go
index 440008c47f..36064514ce 100644
--- a/infra/bots/gen_tasks.go
+++ b/infra/bots/gen_tasks.go
@@ -58,11 +58,12 @@ var (
jobNameSchema *JobNameSchema
// Flags.
- androidMapFile = flag.String("android_map", "", "JSON file containing a mapping of human-friendly Android device names to a pair of {device_type, device_os}.")
- assetsDir = flag.String("assets_dir", "", "Directory containing assets.")
- cfgFile = flag.String("cfg_file", "", "JSON file containing general configuration information.")
- gpuMapFile = flag.String("gpu_map", "", "JSON file containing a mapping of human-friendly GPU names to PCI IDs.")
- jobsFile = flag.String("jobs", "", "JSON file containing jobs to run.")
+ androidMapFile = flag.String("android_map", "", "JSON file containing a mapping of human-friendly Android device names to a pair of {device_type, device_os}.")
+ builderNameSchemaFile = flag.String("builder_name_schema", "", "Path to the builder_name_schema.json file. If not specified, uses infra/bots/recipe_modules/builder_name_schema/builder_name_schema.json from this repo.")
+ assetsDir = flag.String("assets_dir", "", "Directory containing assets.")
+ cfgFile = flag.String("cfg_file", "", "JSON file containing general configuration information.")
+ gpuMapFile = flag.String("gpu_map", "", "JSON file containing a mapping of human-friendly GPU names to PCI IDs.")
+ jobsFile = flag.String("jobs", "", "JSON file containing jobs to run.")
)
// linuxGceDimensions are the Swarming dimensions for Linux GCE
@@ -639,7 +640,10 @@ func main() {
loadJson(cfgFile, path.Join(infraBots, "cfg.json"), &CONFIG)
// Create the JobNameSchema.
- schema, err := NewJobNameSchema(path.Join(b.CheckoutRoot(), "infra", "bots", "recipe_modules", "builder_name_schema", "builder_name_schema.json"))
+ if *builderNameSchemaFile == "" {
+ *builderNameSchemaFile = path.Join(b.CheckoutRoot(), "infra", "bots", "recipe_modules", "builder_name_schema", "builder_name_schema.json")
+ }
+ schema, err := NewJobNameSchema(*builderNameSchemaFile)
if err != nil {
glog.Fatal(err)
}