Created
October 1, 2019 18:22
-
-
Save hugelgupf/a1c08699ea2dc8f5c20ee485a0c75da5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
q, cleanup := vmtest.QEMUTest(t, &vmtest.Options{ | |
BuildOpts: uroot.Opts{ | |
Commands: uroot.BusyBoxCmds( | |
"github.com/u-root/u-root/cmds/core/init", | |
"github.com/u-root/u-root/cmds/core/kexec", | |
), | |
ExtraFiles: []string{ | |
"/tmp/multibootKernel:kernel", | |
}, | |
}, | |
Uinit: []string{ | |
`kexec -l kernel -e -d --module="/kernel foo=bar" --module="/bbin/bb"`, | |
}, | |
QEMUOpts: qemu.Options{ | |
SerialOutput: &serial, | |
}, | |
}) | |
defer cleanup() | |
if err := q.Expect(`"status": "ok"`); err != nil { | |
t.Logf(string(serial.Bytes())) | |
t.Fatalf(`expected '"status": "ok"', got error: %v`, err) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment