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>
This commit is contained in:
Eric Boren 2017-02-07 09:16:30 -05:00 committed by Skia Commit-Bot
parent 67386d44c7
commit 1f8be68917

View File

@ -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)
}