diff options
| author | Jeff Carr <[email protected]> | 2024-12-15 08:47:03 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-12-15 08:47:03 -0600 |
| commit | 41b716d64489638e14cead1b397153c69fd3539d (patch) | |
| tree | 0f3d67939e5f41fb566ffda4a01148e44c7c7245 /go-clone-test/main.go | |
| parent | 08cc2e58dba9448a021095105d9663a6d91ea8de (diff) | |
still testing when in 'go.work' modev0.0.13
Diffstat (limited to 'go-clone-test/main.go')
| -rw-r--r-- | go-clone-test/main.go | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/go-clone-test/main.go b/go-clone-test/main.go index 46c296b..cb49a69 100644 --- a/go-clone-test/main.go +++ b/go-clone-test/main.go @@ -20,6 +20,7 @@ func main() { me = new(testMe) me.startPwd, _ = os.Getwd() + // don't run this anywhere important me.forge = forgepb.Init() if me.forge.IsGoWork() { log.Info() @@ -39,6 +40,9 @@ func main() { } } + // make sure this is empty + me.forge = nil + me.testDir1 = "goclonetest" fullRun(me.testDir1) @@ -101,8 +105,8 @@ func prepBinary(testDir string, gopath string) { os.Unsetenv("FORGE_CONFIG") os.Unsetenv("FORGE_GOSRC") runStrict(wd, []string{"sync"}) - runStrict(wd, []string{"/home/jcarr/go/bin/go-clone", "--recursive", gopath}) - runStrict(wd, []string{"/home/jcarr/go/bin/go-clone", "--work"}) + runStrict(wd, []string{"/home/jcarr/go/bin/go-clone", "--recursive", gopath, "--work"}) + // runStrict(wd, []string{"/home/jcarr/go/bin/go-clone", "--work"}) } func buildBinary(testDir string, gopath string) { @@ -142,24 +146,20 @@ func runStrict(wd string, cmd []string) { log.Info(wd, "running:", wd, cmd) // result := shell.Run(cmd) result := shell.RunRealtime(cmd) - if result.Exit != 0 { + if result.Error != nil { log.Info("cmd failed", wd, cmd, err) - for i, line := range result.Stdout { - log.Info("STDOUT:", i, line) - } - for i, line := range result.Stderr { - log.Info("STDERR:", i, line) - } + /* + for i, line := range result.Stdout { + log.Info("STDOUT:", i, line) + } + for i, line := range result.Stderr { + log.Info("STDERR:", i, line) + } + */ os.Exit(-1) } - if result.Error != nil { - log.Info("cmd failed", wd, cmd, err) - for i, line := range result.Stdout { - log.Info("STDOUT:", i, line) - } - for i, line := range result.Stderr { - log.Info("STDERR:", i, line) - } + if result.Exit != 0 { + log.Info("cmd failed", wd, cmd) os.Exit(-1) } for i, line := range result.Stdout { |
