tasks

package
v0.0.0-...-e560ebb Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2021 License: BSD-3-Clause Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Audit = &subcommands.Command{
	UsageLine: "audit [flags...] [HOST...]",
	ShortDesc: "create audit tasks",
	LongDesc: `Create audit tasks.

This command does not wait for the tasks to start running.
By default no action runnings. Please specified action to run them via flags.`,
	CommandRun: func() subcommands.CommandRun {
		c := &auditRun{}
		c.authFlags.Register(&c.Flags, site.DefaultAuthOptions)
		c.envFlags.Register(&c.Flags)
		c.Flags.IntVar(&c.expirationMins, "expiration-mins", 10, "The expiration minutes of the audit request.")
		c.Flags.BoolVar(&c.runVerifyServoUSB, "run-verify-servo-usb", false, "Run the verifier for Servo USB drive.")
		c.Flags.BoolVar(&c.runVerifyDUTStorage, "run-verify-dut-storage", false, "Run the verifier for DUT storage.")
		c.Flags.BoolVar(&c.runVerifyServoFw, "run-verify-servo-fw", false, "Run the verifier for Servo firmware update.")
		c.Flags.BoolVar(&c.runFlashServoKeyboardMap, "run-flash-servo-keyboard-map", false, "Run the action to flash Servo keyboard map to the DUT.")
		c.Flags.BoolVar(&c.runVerifyDutMacaddr, "run-verify-dut-macaddr", false, "Run the verifier to check and cache mac address of DUT NIC to Servo.")
		return c
	},
}

Audit subcommand: Audit hosts.

View Source
var BackfillRequest = &subcommands.Command{
	UsageLine: `backfill-request [FLAGS...]`,
	ShortDesc: "backfill unsuccessful results for a previous request [DEPRECATED--please use crosfleet (go/crosfleet-cli)]",
	LongDesc: `[DEPRECATED--please use crosfleet (go/crosfleet-cli)]

Backfill unsuccessful results for a previous request.

This command creates a new cros_test_platform request to backfill results from
unsuccessful (expired, timed out, or failed) tasks from a previous build.

The backfill request uses the same parameters as the original request (model,
pool, build etc.). The backfill request attempts to minimize unnecessary task
execution by skipping tasks that have succeeded previously when possible.

This command does not wait for the build to start running.`,
	CommandRun: func() subcommands.CommandRun {
		c := &backfillRequestRun{}
		c.authFlags.Register(&c.Flags, site.DefaultAuthOptions)
		c.envFlags.Register(&c.Flags)
		c.Flags.Int64Var(&c.buildID, "id", -1, "Search for original build with this ID. Mutually exclusive with -tag.")
		c.Flags.Var(flag.StringSlice(&c.buildTags), "tag", "Search for original build matching given tag. May be used multiple times to provide more tags to match. Mutually exclusive with -id")
		c.Flags.BoolVar(&c.highestPriority, "highest-priority", false, "Create backfill tasks at highest priority. This will displace legitimate prod tasks. Use with care.")
		return c
	},
}

BackfillRequest subcommand: Backfill unsuccessful results for a previous request.

View Source
var CreateSuite = &subcommands.Command{
	UsageLine: "create-suite [FLAGS...] SUITE_NAME",
	ShortDesc: "create a suite task [DEPRECATED--please use crosfleet (go/crosfleet-cli)]",
	LongDesc: `[DEPRECATED--please use crosfleet (go/crosfleet-cli)]

Create a suite task, with the given suite name.

You must supply -board, -image, and -pool.

This command does not wait for the task to start running.`,
	CommandRun: func() subcommands.CommandRun {
		c := &createSuiteRun{}
		c.authFlags.Register(&c.Flags, site.DefaultAuthOptions)
		c.envFlags.Register(&c.Flags)
		c.createRunCommon.Register(&c.Flags)
		c.Flags.BoolVar(&c.orphan, "orphan", false, "Deprecated, do not use.")
		c.Flags.BoolVar(&c.json, "json", false, "Format output as JSON")
		c.Flags.StringVar(&c.taskName, "task-name", "", "Optional name to be used for the Swarming task.")
		return c
	},
}

CreateSuite subcommand: create a suite task.

View Source
var CreateTest = &subcommands.Command{
	UsageLine: `create-test [FLAGS...] TEST_NAME [TEST_NAME...]`,
	ShortDesc: "create a test task [DEPRECATED--please use crosfleet (go/crosfleet-cli)]",
	LongDesc: `[DEPRECATED--please use crosfleet (go/crosfleet-cli)]

Create a test task.

You must supply -board, -image, and -pool.

This command does not wait for the task to start running.`,
	CommandRun: func() subcommands.CommandRun {
		c := &createTestRun{}
		c.authFlags.Register(&c.Flags, site.DefaultAuthOptions)
		c.envFlags.Register(&c.Flags)
		c.createRunCommon.Register(&c.Flags)
		c.Flags.BoolVar(&c.client, "client-test", false, "(Deprecated).")
		c.Flags.StringVar(&c.testArgs, "test-args", "", "Test arguments string (meaning depends on test).")
		c.Flags.StringVar(&c.parentTaskID, "parent-task-run-id", "", "For internal use only. Task run ID of the parent (suite) task to this test. Note that this must be a run ID (i.e. not ending in 0).")

		return c
	},
}

CreateTest subcommand: create a test task.

View Source
var CreateTestPlan = &subcommands.Command{
	UsageLine: `create-testplan [FLAGS...]`,
	ShortDesc: "create a testplan task",
	LongDesc: `Create a testplan task. [DEPRECATED--please use crosfleet (go/crosfleet-cli)]

[DEPRECATED--please use crosfleet (go/crosfleet-cli)]

This command is more general than create-test or create-suite. The supplied
testplan should conform to the TestPlan proto as defined here:
https://chromium.googlesource.com/chromiumos/infra/proto/+/master/src/test_platform/request.proto

You must supply -board, -image, -pool, and -plan-file.

This command does not wait for the task to start running.`,
	CommandRun: func() subcommands.CommandRun {
		c := &createTestPlanRun{}
		c.authFlags.Register(&c.Flags, site.DefaultAuthOptions)
		c.envFlags.Register(&c.Flags)
		c.createRunCommon.Register(&c.Flags)
		c.Flags.StringVar(&c.testplanPath, "plan-file", "", "Path to jsonpb-encoded test plan.")
		c.Flags.StringVar(&c.legacySuite, "legacy-suite", "", "DEPRECATED. Has no effect.")
		return c
	},
}

CreateTestPlan subcommand: create a testplan task.

View Source
var LeaseDut = &subcommands.Command{
	UsageLine: "lease-dut HOST\n\tskylab lease-dut -model MODEL",
	ShortDesc: "lease DUT for debugging [DEPRECATED--please use crosfleet (go/crosfleet-cli)]",
	LongDesc: `[DEPRECATED--please use crosfleet (go/crosfleet-cli)]

Lease DUT for debugging.

This subcommand's behavior is subject to change without notice.
Do not build automation around this subcommand.`,
	CommandRun: func() subcommands.CommandRun {
		c := &leaseDutRun{}
		c.authFlags.Register(&c.Flags, site.DefaultAuthOptions)
		c.envFlags.Register(&c.Flags)

		c.Flags.Float64Var(&c.leaseMinutes, "minutes", 60, "Duration of lease.")
		c.Flags.StringVar(&c.leaseReason, "reason", "", "The reason to perform this lease, it must match crbug.com/NNNN or b/NNNN.")

		c.Flags.StringVar(&c.model, "model", "", "Leases may optionally target a model instead of a hostname.")
		c.Flags.StringVar(&c.board, "board", "", "Leases may optionally target a board instead of a hostname.")

		c.Flags.Var(flagx.Dims(&c.dims), "dim", "Single additional dimension in format key=value or key:value; may be specified multiple times.")
		c.Flags.Var(flagx.Dims(&c.dims), "dims", "List of additional dimensions in format key1=value1,key2=value2,... or key1:value1,key2:value2,... .")
		c.Flags.BoolVar(&c.evilLease, "evil-lease", false, "Evil lease allows the user to bypass the lease per model limit if there's an emergency.")
		return c
	},
}

LeaseDut subcommand: Lease a DUT for debugging.

View Source
var ReleaseDuts = &subcommands.Command{
	UsageLine: "release-duts HOST [HOST...]",
	ShortDesc: "release DUTs which are previously leased via lease-dut [DEPRECATED--please use crosfleet (go/crosfleet-cli)]",
	LongDesc: `[DEPRECATED--please use crosfleet (go/crosfleet-cli)]

release DUTs which are previously leased via lease-dut.

This subcommand's behavior is subject to change without notice.
Do not build automation around this subcommand.`,
	CommandRun: func() subcommands.CommandRun {
		c := &releaseDutsRun{}
		c.authFlags.Register(&c.Flags, site.DefaultAuthOptions)
		c.envFlags.Register(&c.Flags)
		return c
	},
}

ReleaseDuts subcommand: Release a DUT previously leased via LeaseDuts.

View Source
var Repair = &subcommands.Command{
	UsageLine: "repair [HOST...]",
	ShortDesc: "create repair tasks",
	LongDesc: `Create repair tasks.

This command does not wait for the task to start running.`,
	CommandRun: func() subcommands.CommandRun {
		c := &repairRun{}
		c.authFlags.Register(&c.Flags, site.DefaultAuthOptions)
		c.envFlags.Register(&c.Flags)
		c.Flags.IntVar(&c.expirationMins, "expiration-mins", 10, "The expiration minutes of the repair request.")
		return c
	},
}

Repair subcommand: Repair hosts.

View Source
var RerunTasks = &subcommands.Command{
	UsageLine: "rerun-tasks [-task-id TASK_ID...] [-tag TAG...]",
	ShortDesc: "Deprecated, do not use.",
	LongDesc:  `Create copies of tasks to run again.`,
	CommandRun: func() subcommands.CommandRun {
		c := &rerunTasksRun{}
		c.authFlags.Register(&c.Flags, site.DefaultAuthOptions)
		c.envFlags.Register(&c.Flags)
		c.Flags.BoolVar(&c.outputJSON, "output-json", false, "Format output as JSON.")
		c.Flags.Var(flag.StringSlice(&c.taskIds), "task-id", "Swarming task ids for locating tests to retry. If it's a retry task which is kicked off by rerun-tasks command, it won't be retried. May be specified multiple times.")
		c.Flags.Var(flag.StringSlice(&c.tags), "tag", "Tasks that match all these tags (and that were not already a retry task) will be retried. Task-id and tag cannot be both specified. May be specified multiple times.")
		c.Flags.BoolVar(&c.includePassed, "include-passed", false, "If true, rerun tasks even if they passed the first time. Only apply to tasks matched by tags.")
		c.Flags.BoolVar(&c.dryRun, "dry-run", false, "Print tasks that would be rerun, but don't actually rerun them.")
		c.Flags.BoolVar(&c.preserveParent, "preserve-parent", false, "Preserve the parent task ID of retried tasks. This should be used only within the context of a suite retrying its own children.")
		return c
	},
}

RerunTasks subcommand.

View Source
var Verify = &subcommands.Command{
	UsageLine: "verify [HOST...]",
	ShortDesc: "create verify tasks",
	LongDesc: `Create verify tasks.

This command does not wait for the tasks to start running.`,
	CommandRun: func() subcommands.CommandRun {
		c := &verifyRun{}
		c.authFlags.Register(&c.Flags, site.DefaultAuthOptions)
		c.envFlags.Register(&c.Flags)
		c.Flags.IntVar(&c.expirationMins, "expiration-mins", 10, "The expiration minutes of the request.")
		return c
	},
}

Verify subcommand: Verify hosts.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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