Skip to content

Commit

Permalink
stat-mach-core: ensure stderr makes its way into logs
Browse files Browse the repository at this point in the history
Signed-off-by: Stephen Gutekanst <[email protected]>
  • Loading branch information
emidoots committed Oct 17, 2023
1 parent 01dd9bf commit 746e697
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions internal/wrench/scripts/stat-mach-core.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,21 +64,21 @@ func init() {
durationExtractZig := time.Since(step)
step = time.Now()

_, err = OutputArgs(os.Stderr, "zig", []string{"-h"})
err = ExecArgs("zig", []string{"-h"})(os.Stderr)
if err != nil {
return nil, err
}
durationRunZigHelp := time.Since(step)
step = time.Now()

_, err = OutputArgs(os.Stderr, "zig", []string{"-h"})
err = ExecArgs("zig", []string{"-h"})(os.Stderr)
if err != nil {
return nil, err
}
durationRunZigHelp2 := time.Since(step)
step = time.Now()

_, err = OutputArgs(os.Stderr, "git", []string{"clone", "https://github.com/hexops/mach-core", repoDir})
err = ExecArgs("git", []string{"clone", "https://github.com/hexops/mach-core", repoDir})(os.Stderr)
if err != nil {
return nil, err
}
Expand All @@ -92,7 +92,7 @@ func init() {
durationDirStats := time.Since(step)
step = time.Now()

_, err = OutputArgs(os.Stderr, "zig", []string{"build"}, WorkDir(repoDir))
err = ExecArgs("zig", []string{"build"}, WorkDir(repoDir))(os.Stderr)
if err != nil {
return nil, err
}
Expand All @@ -109,7 +109,7 @@ func init() {
wipeBuildCache()

step = time.Now()
_, err = OutputArgs(os.Stderr, "zig", []string{"build"}, WorkDir(repoDir))
err = ExecArgs("zig", []string{"build"}, WorkDir(repoDir))(os.Stderr)
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -151,23 +151,23 @@ func init() {

wipeBuildCache()
step = time.Now()
_, err = OutputArgs(os.Stderr, "zig", []string{"build", "textured-cube"}, WorkDir(repoDir))
err = ExecArgs("zig", []string{"build", "textured-cube"}, WorkDir(repoDir))(os.Stderr)
if err != nil {
return nil, err
}
durationZigBuildTexturedCube := time.Since(step)

wipeBuildCache()
step = time.Now()
_, err = OutputArgs(os.Stderr, "zig", []string{"build", "triangle"}, WorkDir(repoDir))
err = ExecArgs("zig", []string{"build", "triangle"}, WorkDir(repoDir))(os.Stderr)
if err != nil {
return nil, err
}
durationZigBuildTriangle := time.Since(step)

wipeBuildCache()
step = time.Now()
_, err = OutputArgs(os.Stderr, "zig", []string{"build", "textured-cube", "-Doptimize=ReleaseFast"}, WorkDir(repoDir))
err = ExecArgs("zig", []string{"build", "textured-cube", "-Doptimize=ReleaseFast"}, WorkDir(repoDir))(os.Stderr)
if err != nil {
return nil, err
}
Expand All @@ -180,7 +180,7 @@ func init() {

wipeBuildCache()
step = time.Now()
_, err = OutputArgs(os.Stderr, "zig", []string{"build", "triangle", "-Doptimize=ReleaseFast"}, WorkDir(repoDir))
err = ExecArgs("zig", []string{"build", "triangle", "-Doptimize=ReleaseFast"}, WorkDir(repoDir))(os.Stderr)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 746e697

Please sign in to comment.