diff options
author | Kiran Kamineni <kiran.k.kamineni@intel.com> | 2019-11-01 13:04:32 -0700 |
---|---|---|
committer | Kiran Kamineni <kiran.k.kamineni@intel.com> | 2019-11-06 17:01:23 -0800 |
commit | 10f7e1c6f3046873b05f118f48cb3daef5feee14 (patch) | |
tree | c404ff0e7a41695e2c92c8fe9b82e27ba962a3cc /src | |
parent | 5839289be6a6f3a1441d73bd9e8a8ee4bf1dc1a3 (diff) |
Add race condition detection
Add the -race flag to detect any race conditions
in the k8splugin code
It is enabled only for tests right now because of performance
impact on builds.
Issue-ID: MULTICLOUD-870
Change-Id: I53a90df39d2d8b51cbdb6c320f2247721ed98a07
Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/k8splugin/Makefile | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/k8splugin/Makefile b/src/k8splugin/Makefile index 7d41158c..77196afa 100644 --- a/src/k8splugin/Makefile +++ b/src/k8splugin/Makefile @@ -25,8 +25,8 @@ deploy: build .PHONY: test test: clean - @go build -buildmode=plugin -o ./mock_files/mock_plugins/mockplugin.so ./mock_files/mock_plugins/mockplugin.go - @go test -v ./... + @go build -race -buildmode=plugin -o ./mock_files/mock_plugins/mockplugin.so ./mock_files/mock_plugins/mockplugin.go + @go test -race ./... format: @go fmt ./... @@ -40,5 +40,5 @@ clean: .PHONY: cover cover: - @go test ./... -coverprofile=coverage.out + @go test -race ./... -coverprofile=coverage.out @go tool cover -html=coverage.out -o coverage.html |