Skip to content

Commit

Permalink
Merge pull request #24404 from Luap99/machine-debug
Browse files Browse the repository at this point in the history
pkg/machine/e2e: remove debug
  • Loading branch information
openshift-merge-bot[bot] authored Oct 30, 2024
2 parents daf0b52 + ce24ab0 commit 9156eae
Showing 1 changed file with 0 additions and 27 deletions.
27 changes: 0 additions & 27 deletions pkg/machine/e2e/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"os"
"os/exec"
"path/filepath"
"runtime"
"slices"
"strconv"
"strings"
Expand Down Expand Up @@ -50,7 +49,6 @@ type machineTestBuilder struct {
names []string
podmanBinary string
timeout time.Duration
isInit bool
}

// waitWithTimeout waits for a command to complete for a given
Expand Down Expand Up @@ -141,10 +139,6 @@ func (m *machineTestBuilder) setCmd(mc machineCommand) *machineTestBuilder {
m.names = append(m.names, m.name)
}
m.cmd = mc.buildCmd(m)

_, ok := mc.(*initMachine)
m.isInit = ok

return m
}

Expand Down Expand Up @@ -173,27 +167,6 @@ func (m *machineTestBuilder) runWithoutWait() (*machineSession, error) {

func (m *machineTestBuilder) run() (*machineSession, error) {
s, err := runWrapper(m.podmanBinary, m.cmd, m.timeout, true)
// debug for the slow init on macos
// The image file is not consistent, sometimes it is sparse sometimes not.
if m.isInit && runtime.GOOS == "darwin" {
c := exec.Command("du", "-ah", filepath.Join(os.Getenv("HOME"), ".local/share/containers/podman/machine/applehv"))
c.Stderr = os.Stderr
c.Stdout = os.Stdout
GinkgoWriter.Println(c.Args)
_ = c.Run()

c = exec.Command("ls", "-lh", filepath.Join(os.Getenv("HOME"), ".local/share/containers/podman/machine/applehv"))
c.Stderr = os.Stderr
c.Stdout = os.Stdout
GinkgoWriter.Println(c.Args)
_ = c.Run()

c = exec.Command("stat", filepath.Join(os.Getenv("HOME"), ".local/share/containers/podman/machine/applehv", m.name+"-arm64.raw"))
c.Stderr = os.Stderr
c.Stdout = os.Stdout
GinkgoWriter.Println(c.Args)
_ = c.Run()
}
return s, err
}

Expand Down

1 comment on commit 9156eae

@packit-as-a-service
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

podman-next COPR build failed. @containers/packit-build please check.

Please sign in to comment.