aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2022-06-07 09:19:16 +0200
committerDmitry Vyukov <dvyukov@google.com>2022-06-07 13:49:53 +0200
commit846de3b6d47376bbaea95a4910eda36c300b8b99 (patch)
tree8d54a326d656ec1b338e3d8ac25e03b85e80c412 /Makefile
parentc885789257c76ea4479ea36282f5e0a2c7861e26 (diff)
Makefile: run vet only once during presubmit
Go test runs vet tool on source files. Vet tool takes insane amount of time on our auto-generated files. We run go test in 3 presubmit stages, disable vet with -vet=off in all but one presubmit stage. It should give the same coverage, but save some latency and maybe reduce OOMs in race stage. syzkaller$ TIME="%e %M" taskset -c 0 time go test -run=nothing ./prog ok github.com/google/syzkaller/prog 0.162s [no tests to run] 88.59 6766736 syzkaller$ TIME="%e %M" taskset -c 0 time go test -run=nothing -vet=off ./prog ok github.com/google/syzkaller/prog 0.159s [no tests to run] 40.22 5256900
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile4
1 files changed, 2 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 18448309e..f5c4e8389 100644
--- a/Makefile
+++ b/Makefile
@@ -349,12 +349,12 @@ presubmit_big: descriptions
# but these OSes use fixed toolchains and are not affected by SYZ_CLANG=yes.
# This way we get maximum coverage: smoke run tests Linux/gcc,
# while this run tests Linux/clang + the additional OSes.
- SYZ_CLANG=yes $(GO) test -short -coverprofile=.coverage.txt ./dashboard/app ./pkg/csource ./pkg/cover
+ SYZ_CLANG=yes $(GO) test -short -vet=off -coverprofile=.coverage.txt ./dashboard/app ./pkg/csource ./pkg/cover
presubmit_race: descriptions
# -race requires cgo
env CGO_ENABLED=1 $(GO) test -race; if test $$? -ne 2; then \
- env CGO_ENABLED=1 $(GO) test -race -short -bench=.* -benchtime=.2s ./... ;\
+ env CGO_ENABLED=1 $(GO) test -race -short -vet=off -bench=.* -benchtime=.2s ./... ;\
fi
presubmit_old: descriptions