From 9cfaba2b8149e53864a77c38bbd6ac0248461ed5 Mon Sep 17 00:00:00 2001 From: Manfred Touron Date: Tue, 23 Jul 2019 15:39:24 +0200 Subject: [PATCH] chore: use -race for testing --- Makefile | 5 +++-- cmd/pertify/go.mod | 2 +- cmd/pertify/main.go | 2 +- examples/go.mod | 2 +- viz/go.mod | 5 ++++- viz/go.sum | 4 ++++ 6 files changed, 14 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index f1ac92a..49eda1d 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,8 @@ .PHONY: test test: - go test -v ./... - cd examples; go test -v ./... + set -e; for dir in `find . -type f -name "go.mod" | sed -r 's@/[^/]+$$@@' | sort | uniq`; do \ + (set -xe; cd $$dir; go test -v -cover -race ./...); \ + done .PHONY: tidy-all tidy-all: diff --git a/cmd/pertify/go.mod b/cmd/pertify/go.mod index 4aff048..1de7fee 100644 --- a/cmd/pertify/go.mod +++ b/cmd/pertify/go.mod @@ -2,7 +2,7 @@ module moul.io/cmd/pertify go 1.12 -require moul.io/graphman v0.0.0 +require moul.io/graphman v1.0.0 require ( github.com/pkg/errors v0.8.1 diff --git a/cmd/pertify/main.go b/cmd/pertify/main.go index f910df2..7931c4e 100644 --- a/cmd/pertify/main.go +++ b/cmd/pertify/main.go @@ -27,7 +27,7 @@ func main() { Action: graph, } if err := app.Run(os.Args); err != nil { - log.Fatal("error: %v", err) + log.Fatalf("error: %v", err) } } diff --git a/examples/go.mod b/examples/go.mod index 2494ba1..1427e65 100644 --- a/examples/go.mod +++ b/examples/go.mod @@ -2,7 +2,7 @@ module moul.io/graphman/examples go 1.12 -require moul.io/graphman v0.0.0 +require moul.io/graphman v1.0.0 require moul.io/graphman/viz v0.0.0 diff --git a/viz/go.mod b/viz/go.mod index ee22307..0dda050 100644 --- a/viz/go.mod +++ b/viz/go.mod @@ -2,4 +2,7 @@ module moul.io/graphman/viz go 1.12 -require github.com/awalterschulze/gographviz v0.0.0-20190522210029-fa59802746ab +require ( + github.com/awalterschulze/gographviz v0.0.0-20190522210029-fa59802746ab + moul.io/graphman v1.0.0 +) diff --git a/viz/go.sum b/viz/go.sum index eb15c99..a2ece50 100644 --- a/viz/go.sum +++ b/viz/go.sum @@ -1,2 +1,6 @@ github.com/awalterschulze/gographviz v0.0.0-20190522210029-fa59802746ab h1:+cdNqtOJWjvepyhxy23G7z7vmpYCoC65AP0nqi1f53s= github.com/awalterschulze/gographviz v0.0.0-20190522210029-fa59802746ab/go.mod h1:GEV5wmg4YquNw7v1kkyoX9etIk8yVmXj+AkDHuuETHs= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +moul.io/graphman v1.0.0 h1:vXCIHlGMdzuZKb1gBByRj38y7e7PO2rfc/DDK4zYnzA= +moul.io/graphman v1.0.0/go.mod h1:7OpdQsfE4ibHqHP+Ir1VAUd4p5j25n4xU9bhJvQ+F0g=