Documentation ¶
Overview ¶
Package integ contains integ tests run by mage. Certain env vars must be set, or the tests will be skipped.
Required: * INFRA_ROOT * UROOT_KERNEL * UROOT_QEMU
Optional: * TEMPDIR
See mage for what values are used.
Index ¶
- Constants
- Variables
- func BaselineVM(uefi bool, m int, tb gtst.TB, tmpdir string) *qemu.Options
- func CheckEnv(t gtst.TB) (rootDir, mfgKernel string)
- func CleanOldDirs(t gtst.TB, pfx string)
- func EnvFromSys(cpus int, kvm bool)
- func EraseOpts(t gtst.TB, tmpdir string) *qemu.Options
- func ExecQuoted(xargs []string) string
- func FRopts(t gtst.TB, tmpdir string) *vmtest.Options
- func Flags()
- func GetLcd() (qemu.Device, error)
- func Initramfs(tmpdir, combinedCpio string, tags []string, dirs ...string) *irfs
- func Mfgopts(t gtst.TB, tmpdir, mfgurl string, serOut io.WriteCloser) (*vmtest.Options, error)
- func PostMfgFixups(qopts *qemu.Options)
- func ReadJson(dir string) (cmd []string, port int)
- func VmDir(tb gtst.TB, pfx string, cleanOld bool) (string, func(tb gtst.TB))
- func WindowedVMCmd(opts *qemu.Options) *exec.Cmd
- func WriteJson(dir string, cmd *exec.Cmd, port int)
- type KBuildOpts
- type NoEscape
- type P9RecovOpts
- type UrootLoggerAdapter
- type UserOpts
Constants ¶
const GB = 1024 * 1024 * 1024
Variables ¶
see flags below for descriptions
Functions ¶
func BaselineVM ¶
Defines the base vm used for 'devvm' and lifecycle tests.
func CleanOldDirs ¶
func EnvFromSys ¶
func ExecQuoted ¶
pretty-prints (quotes) args for user re-use.
func GetLcd ¶
Finds lcd info necessary for passthrough to qemu vm. Tested with ftdi devices, not with cdc acm - may need some work there.
func PostMfgFixups ¶
func VmDir ¶
Creates a temp dir, optionally removing old dirs with same prefix. Returns a function to defer for clean up. If cleanOld may be true, tests running simultaneously must not use same pfx.
func WindowedVMCmd ¶
fixes up qemu args to work for windowed display
Types ¶
type KBuildOpts ¶
type KBuildOpts struct {
Recipe, Mfg, Norm, Test bool
}
type NoEscape ¶
type NoEscape struct {
Out io.WriteCloser
}
NoEscape is an io.WriteCloser that filters out escape chars, replacing with '~'
type P9RecovOpts ¶
type P9RecovOpts struct { T *testing.T Qopts *qemu.Options Tmpdir string Upd []byte Krnl, Xlog string BadHistory bool // contains filtered or unexported fields }
func (*P9RecovOpts) Setup ¶
func (p9 *P9RecovOpts) Setup()
Writes files to a dir that'll be shared via 9p as the recovery volume
type UrootLoggerAdapter ¶
type UrootLoggerAdapter struct{}
some u-root functions take a Logger interface. This statisfies that interface, without use/redirection of std log.
func (*UrootLoggerAdapter) Print ¶
func (*UrootLoggerAdapter) Print(v ...interface{})
func (*UrootLoggerAdapter) Printf ¶
func (*UrootLoggerAdapter) Printf(format string, v ...interface{})