Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions vm/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ var builds = []build{
}

func main() {
_, verbose := os.LookupEnv("VM_VERBOSE")

env := []string{"CGO_ENABLED=0"}
for _, b := range builds {
log.Printf("Build %v", b)
Expand Down Expand Up @@ -130,15 +132,14 @@ func main() {
if len(b.container) == 0 {
continue
}
if false {
if verbose {
ref, err := name.ParseReference(b.container, name.Insecure)
if err != nil {
log.Fatal(err)
}

fmt.Printf("parse %s to %s", b.container, ref.Name())
}
//img, err := crane.Pull(ref.Name())
img, err := crane.Pull(b.container)
if err != nil {
log.Fatal(err)
Expand Down
7 changes: 4 additions & 3 deletions vm/ip_linux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ func none(s string, t []string) bool {
// TestIP tests creation and removal of addresses, tunnels, and
// ARP entries with the u-root ip command.
func TestIP(t *testing.T) {
_, spew := os.LookupEnv("VMTEST_SPEW")
d := t.TempDir()
for _, arch := range []string{"amd64", "arm", "arm64", "riscv64"} {
i, err := vm.New("linux", arch)
Expand All @@ -66,7 +67,7 @@ func TestIP(t *testing.T) {

// For debug. It's been needed, but we do not want this spew in
// CI logs, so leave it off.
if false {
if spew {
c.Stdout, c.Stderr = os.Stdout, os.Stderr
}
if err := i.StartVM(c); err != nil {
Expand Down Expand Up @@ -206,13 +207,13 @@ func TestIP(t *testing.T) {
t.Errorf("CPUCommand: got %v, want nil", err)
continue
}
if false {
if spew {
client.SetVerbose(t.Logf)
}

b, err := cpu.CombinedOutput()

if false { // Only enable this if you want to see console output/errors.
if spew { // Only enable this if you want to see console output/errors.
t.Logf("%s %v", string(b), err)
}

Expand Down
Loading