Fix test command
This commit is contained in:
parent
681e5f2955
commit
994a59f1f7
14
magefile.go
14
magefile.go
|
@ -135,11 +135,14 @@ func runAndStreamOutput(cmd string, args ...string) {
|
|||
reader := bufio.NewReader(stdout)
|
||||
line, err := reader.ReadString('\n')
|
||||
for err == nil {
|
||||
fmt.Println(line)
|
||||
fmt.Print(line)
|
||||
line, err = reader.ReadString('\n')
|
||||
}
|
||||
|
||||
c.Wait()
|
||||
if err := c.Wait(); err != nil {
|
||||
fmt.Printf("Error: %s", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
|
||||
// Clean all build, executable and bindata files.
|
||||
|
@ -161,14 +164,9 @@ func Clean() error {
|
|||
|
||||
func Test() {
|
||||
// We run everything sequentially and not in parallel to prevent issues with real test databases
|
||||
// VIKUNJA_SERVICE_ROOTPATH=$(shell pwd) go test $(GOFLAGS) -p 1 -cover -coverprofile cover.out $(PACKAGES)
|
||||
args := []string{"test", Goflags[0], "-p 1"}
|
||||
args := []string{"test", Goflags[0], "-p", "1"}
|
||||
args = append(args, ApiPackages...)
|
||||
runAndStreamOutput("go", args...)
|
||||
//for _, a := range ApiPackages {
|
||||
// args[len(args)-1] = a
|
||||
// runAndStreamOutput("go", args...)
|
||||
//}
|
||||
}
|
||||
|
||||
func TestCoverage() {
|
||||
|
|
Loading…
Reference in New Issue