botanist

package
v0.0.0-...-8023e94 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2021 License: BSD-2-Clause Imports: 11 Imported by: 0

README

botanist

botanist is a tool used by the infrastructure to set up the bot environment before running tests. It handles setting some environment variables used by the other tools it invokes and also handles the initial starting up of the target(s) it will run the tests on.

botanist currently has three subcommands, two of which are planned for deprecation:

  • run botanist run is the main subcommand which is used by most of the builders run by the infrastructure. It takes a device config and image manifest and starts up the corresponding target in the device config. It also takes a command to run after starting up the targets. Usually this will be testrunner which takes in a test manifest containing the tests to run.

  • qemu botanist qemu is used to run bringup tests on QEMU. It starts a QEMU instance with a config it constructs from the command arguments and waits for it to complete. The required arguments are -type which specifies what type of emulator to run (qemu or aemu), and -qemu-dir which points to a directory containing the qemu binaries. It writes the test results to a MinFS image provided by the -minfs flag.

  • zedboot botanist zedboot is used to run bringup tests on physical devices. It paves the device and polls for a summary.json to be produced that contains the results to the tests that were run. This summary.json follows the runtests.TestSummary schema.

qemu and zedboot are both used for bringup tests. They take in an image manifest and various args to define the device config and where to output results. The positional arguments are used as extra command-line arguments to pass to the kernel.

The infrastructure writes a runcmds script which contains a list of all the tests it wants to run and embeds this into the zbi image used to boot the target. It then calls one of these subcommands with a command line argument that specifies to run the runcmds script on boot. After botanist starts up the target, it waits until it gets a signal that the tests are completed.

Documentation

Index

Constants

View Source
const (
	// SerialLogBufferSize gives the amount of data to buffer when doing serial
	// I/O.
	// The maximum amount of data that should need buffering is everything
	// emitted before tests start running, at which point botanist will have
	// handed things off to a subprocess that will be free to begin reading
	// from this buffer. As of 2020-01-18, the size of this data, corresponding
	// to paving, booting, and then establishing a network connection is one
	// the order of 10Kb; we liberally overestimate that by an order of
	// magnitude.
	SerialLogBufferSize = 10000 * 10
)

Variables

This section is empty.

Functions

func AddPackageRepository

func AddPackageRepository(ctx context.Context, client *sshutil.Client, repoURL, blobURL string) error

AddPackageRepository adds a package repository to a connected fuchsia instance with the provided metadata and blob URLs. In either URL, a host of "localhost" will be resolved and scoped as appropriate when dealing with the address from the host and target perspectives.

func ResolveIP

func ResolveIP(ctx context.Context, nodename string) (net.IP, net.IPAddr, error)

ResolveIP returns an IP address of a fuchsia node via mDNS.

TODO(joshuaseaton): Refactor dev_finder to share 'resolve' logic with botanist.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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