testsuite

package
v0.0.0-...-7dbd9af Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2020 License: BSD-3-Clause Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Linuxboot2urootBatcher []exp.Batcher = []exp.Batcher{
	&BExpTLog{
		L: "Matched u-root banner",
		R: "Welcome to u-root!",
		T: 40,
	}, &BExpTLog{
		L: "Matched u-root prompt",
		R: "~/> ",
		T: 5,
	}}

Linuxboot2urootBatcher follows the boot sequence of u-root to the shell prompt

View Source
var LinuxbootEfiLoaderBatcher []exp.Batcher = []exp.Batcher{
	&BExpTLog{
		L: "Matched LinuxBoot banner",
		R: "\\| Starting LinuxBoot \\|",
		T: 20,
	}, &BExpTLog{
		L: "Matched Starting bzImage",
		R: "LinuxBoot: Starting bzImage",
		T: 10,
	}}

LinuxbootEfiLoaderBatcher follows the boot sequence of linuxboot efi loder

Functions

func DescribeBatcherErr

func DescribeBatcherErr(batch []exp.Batcher, res []exp.BatchRes, err error) error

DescribeBatcherErr Describe a Batcher error by picking the batch step

func ExpectOptions

func ExpectOptions(screenLogBaseName string) ([]exp.Option, error)

ExpectOptions return options based on configuration from env returned error cn be considered a warning and logged only

func SetConfLogDir

func SetConfLogDir(basedir string) error

SetConfLogDir update the configuration in environment by setting the log recorder directory (if previously unset)

func TagLog

func TagLog(msg string) func() (exp.Tag, *exp.Status)

TagLog adds logging to goexpect.OK

Types

type BExpTLog

type BExpTLog struct {
	// R contains the Expect command regular expression.
	R string
	// T holds the Expect command timeout in seconds.
	T int
	// L holds the string to log once matched.
	L string
}

BExpTLog implements the Batcher interface for Expect commands with timeout and log on success

func (*BExpTLog) Arg

func (betl *BExpTLog) Arg() string

Arg returns an empty string , not used for SwitchCase.

func (*BExpTLog) Cases

func (betl *BExpTLog) Cases() []exp.Caser

Cases returns the Caser structure.

func (*BExpTLog) Cmd

func (betl *BExpTLog) Cmd() int

Cmd returns the SwitchCase command(BatchSwitchCase).

func (*BExpTLog) Timeout

func (betl *BExpTLog) Timeout() time.Duration

Timeout returns the timeout in seconds.

Jump to

Keyboard shortcuts

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