From 2bf43eae2469fe7a22125efd1b4d3e92568ddec0 Mon Sep 17 00:00:00 2001 From: James Shubin Date: Tue, 12 Mar 2019 15:50:30 -0400 Subject: [PATCH] test: Improve test depth Make sure we're catching everything, including new, deeper code. --- Makefile | 4 ++-- test/test-govet.sh | 2 +- test/test-vet.sh | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 6adbe981..65c292cc 100644 --- a/Makefile +++ b/Makefile @@ -188,8 +188,8 @@ $(addprefix test-shell-,${test_shell}): test-shell-%: build gofmt: # TODO: remove gofmt once goimports has a -s option - find . -maxdepth 6 -type f -name '*.go' -not -path './old/*' -not -path './tmp/*' -not -path './vendor/*' -exec gofmt -s -w {} \; - find . -maxdepth 6 -type f -name '*.go' -not -path './old/*' -not -path './tmp/*' -not -path './vendor/*' -exec goimports -w {} \; + find . -maxdepth 9 -type f -name '*.go' -not -path './old/*' -not -path './tmp/*' -not -path './vendor/*' -exec gofmt -s -w {} \; + find . -maxdepth 9 -type f -name '*.go' -not -path './old/*' -not -path './tmp/*' -not -path './vendor/*' -exec goimports -w {} \; yamlfmt: find . -maxdepth 3 -type f -name '*.yaml' -not -path './old/*' -not -path './tmp/*' -not -path './omv.yaml' -exec ruby -e "require 'yaml'; x=YAML.load_file('{}').to_yaml.each_line.map(&:rstrip).join(10.chr)+10.chr; File.open('{}', 'w').write x" \; diff --git a/test/test-govet.sh b/test/test-govet.sh index 3fe28bcd..1f4672bd 100755 --- a/test/test-govet.sh +++ b/test/test-govet.sh @@ -75,7 +75,7 @@ for pkg in `go list -e ./... | grep -v "^${base}/vendor/" | grep -v "^${base}/ex done # loop through individual *.go files -for file in `find . -maxdepth 9 -type f -name '*.go' -not -path './old/*' -not -path './tmp/*' -not -path 'vendor/*'`; do +for file in `find . -maxdepth 9 -type f -name '*.go' -not -path './old/*' -not -path './tmp/*' -not -path './vendor/*'`; do #if [[ $file == "./vendor/"* ]]; then # skip files that start with... # continue #fi diff --git a/test/test-vet.sh b/test/test-vet.sh index 9392c006..705144f0 100755 --- a/test/test-vet.sh +++ b/test/test-vet.sh @@ -39,7 +39,7 @@ function parser-conflicts() { } # loop through individual *.y files -for file in `find . -maxdepth 9 -type f -name '*.y' -not -path './old/*' -not -path './tmp/*' -not -path 'vendor/*'`; do +for file in `find . -maxdepth 9 -type f -name '*.y' -not -path './old/*' -not -path './tmp/*' -not -path './vendor/*'`; do run-test parser-indentation "$file" run-test parser-conflicts "$file" done