botanist

package
v0.0.0-...-bbc9ce3 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2021 License: BSD-2-Clause Imports: 17 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 run is the 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.

Logging

The continuous integration infrastructure sets several flags on botanist to configure it to output logs to a special directory that will be uploaded to cloud storage upon task completion, to be downloaded by the top-level tryjob for presentation to users.

Syslog

When running against a target that supports SSH, botanist streams syslogs from the target for the duration of the subprocess that it starts.

The syslog is streamed from the target device by running the log_listener command (see //garnet/bin/log_listener/README.md) over SSH, and writing it to the local file specified by -syslog.

Serial log

botanist also collects serial logs from devices that support a serial connection, outputting the logs to the local path specified by -serial-log.

Documentation

Index

Constants

View Source
const (
	DefaultPkgSrvPort = 8083
)

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 NewPackageServer

func NewPackageServer(ctx context.Context, repoPath string, port int) (string, string, error)

NewPackageServer creates and starts a local package server.

func ResolveIP

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

ResolveIP returns the IPv4 and IPv6 addresses of a fuchsia node via mDNS.

It makes a best effort at returning *both* the IPv4 and IPv6 addresses, but if both interfaces do not come up within a reasonable amount of time, it returns only the first one that it finds (and no error).

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