bootservertest

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: 15 Imported by: 0

Documentation

Overview

Package bootservertest includes common code to write smoke tests for bootserver_old.

Index

Constants

View Source
const DefaultNodename = "swarm-donut-petri-acre"

DefaultNodename is the default nodename given to an target with the default QEMU MAC address.

Variables

View Source
var TestDataDir = flag.String("test_data_dir", testDataDir(), "Path to test_data/; only used in GN build")

TestDataDir is the location to test data files.

  • In "go test" mode, it's relative to this directory.
  • In "fx test" mode, it's relative to the build directory (out/default).

Functions

func AttemptPaveNoBind

func AttemptPaveNoBind(t *testing.T, shouldWork bool)

AttemptPaveNoBind attempts to initiate a pave.

func CmdSearchLog

func CmdSearchLog(t *testing.T, logPatterns []LogMatch, name string, arg ...string)

CmdSearchLog searches for a patterns in stderr.

func CmdWithOutput

func CmdWithOutput(t *testing.T, name string, arg ...string) []byte

CmdWithOutput returns a command and returns stdout.

func StartQemu

func StartQemu(t *testing.T, appendCmdline []string, modeString string) *emulatortest.Instance

StartQemu starts a QEMU instance with the given kernel commandline args.

func ToolPath

func ToolPath(t *testing.T, name string) string

ToolPath returns the full path to a tool.

Types

type LogMatch

type LogMatch struct {
	Pattern     string
	ShouldMatch bool
}

LogMatch is one pattern to search for.

Jump to

Keyboard shortcuts

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