still testing when in 'go.work' mode
This commit is contained in:
parent
08cc2e58db
commit
41b716d644
|
@ -1,6 +1,6 @@
|
|||
VERSION = $(shell git describe --tags)
|
||||
GUIVERSION = $(shell git describe --tags)
|
||||
BUILDTIME = $(shell date +%Y.%m.%d_%H%M)
|
||||
BUILDTIME = $(shell date +%s)
|
||||
|
||||
all: build
|
||||
|
||||
|
|
|
@ -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 {
|
||||
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)
|
||||
}
|
||||
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)
|
||||
}
|
||||
/*
|
||||
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.Exit != 0 {
|
||||
log.Info("cmd failed", wd, cmd)
|
||||
os.Exit(-1)
|
||||
}
|
||||
for i, line := range result.Stdout {
|
||||
|
|
Loading…
Reference in New Issue