taskname

package
v0.0.0-...-03d6fc4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 23, 2019 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SCHEMA_FROM_GIT = map[string]*Schema{
	"Build":       {Keys: []string{"os", "compiler", "target_arch", "configuration"}, OptionalKeys: []string{"extra_config"}, RecurseRoles: []string(nil)},
	"BuildStats":  {Keys: []string{"os", "compiler", "target_arch", "configuration"}, OptionalKeys: []string{"extra_config"}, RecurseRoles: []string(nil)},
	"Calmbench":   {Keys: []string{"os", "compiler", "model", "cpu_or_gpu", "cpu_or_gpu_value", "arch", "configuration", "test_filter"}, OptionalKeys: []string{"extra_config"}, RecurseRoles: []string(nil)},
	"Housekeeper": {Keys: []string{"frequency"}, OptionalKeys: []string{"extra_config"}, RecurseRoles: []string(nil)},
	"Infra":       {Keys: []string{"frequency"}, OptionalKeys: []string{"extra_config"}, RecurseRoles: []string(nil)},
	"Perf":        {Keys: []string{"os", "compiler", "model", "cpu_or_gpu", "cpu_or_gpu_value", "arch", "configuration", "test_filter"}, OptionalKeys: []string{"extra_config"}, RecurseRoles: []string(nil)},
	"Test":        {Keys: []string{"os", "compiler", "model", "cpu_or_gpu", "cpu_or_gpu_value", "arch", "configuration", "test_filter"}, OptionalKeys: []string{"extra_config"}, RecurseRoles: []string(nil)},
	"Upload":      {Keys: []string(nil), OptionalKeys: []string(nil), RecurseRoles: []string{"Build", "BuildStats", "Calmbench", "Perf", "Test"}},
}
View Source
var SEPARATOR_FROM_GIT = "-"

Functions

This section is empty.

Types

type MockTaskNameParser

type MockTaskNameParser struct {
	mock.Mock
}

func NewMockTaskNameParser

func NewMockTaskNameParser() *MockTaskNameParser

NewMockTaskNameParser returns a pointer to a newly created struct. We return the pointer because we want to make sure the methods on mock.Mock stay accessible, e.g. m.On()

func (*MockTaskNameParser) ParseTaskName

func (m *MockTaskNameParser) ParseTaskName(name string) (map[string]string, error)

type Schema

type Schema struct {
	// Key names, in order, for this role.
	Keys []string `json:"keys"`

	// Optional key names, in order, for this role. These come after Keys
	// and RecurseRoles in task names.
	OptionalKeys []string `json:"optional_keys"`

	// Recursively apply one of these roll names to the schema (eg.
	// "Upload-Test-*").  The keys from the sub-role are applied to this
	// role.
	RecurseRoles []string `json:"recurse_roles"`
}

Schema is a sub-struct of taskNameParser.

type TaskNameParser

type TaskNameParser interface {
	ParseTaskName(name string) (map[string]string, error)
}

TaskNameParser parses a builder/task name into its constituent parts See https://skia.googlesource.com/skia/+/master/infra/bots/recipe_modules/builder_name_schema/builder_name_schema.json

func DefaultTaskNameParser

func DefaultTaskNameParser() TaskNameParser

DefaultTaskNameParser creates a TaskNameParser using the schema created by gen_schema.go.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL