Skip to content

Commit

Permalink
Adding -race flag to check for race conditions (#555)
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrea-Campanella authored and ray-milkey committed Sep 13, 2019
1 parent 2bb1c14 commit f041fb7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ MODELPLUGINS = build/_output/testdevice.so.1.0.0 build/_output/testdevice.so.2.0

build: # @HELP build the Go binaries and run all validations (default)
build: $(MODELPLUGINS)
CGO_ENABLED=1 go build -o build/_output/onos-config ./cmd/onos-config
CGO_ENABLED=1 go build -gcflags "all=-N -l" -o build/_output/onos-config-debug ./cmd/onos-config
CGO_ENABLED=1 go build -race -o build/_output/onos-config ./cmd/onos-config
CGO_ENABLED=1 go build -race -gcflags "all=-N -l" -o build/_output/onos-config-debug ./cmd/onos-config

build/_output/testdevice.so.1.0.0: modelplugin/TestDevice-1.0.0/modelmain.go modelplugin/TestDevice-1.0.0/testdevice_1_0_0/generated.go
-CGO_ENABLED=1 go build -o build/_output/testdevice.so.1.0.0 -buildmode=plugin -tags=modelplugin ./modelplugin/TestDevice-1.0.0
Expand All @@ -32,9 +32,9 @@ build/_output/stratum.so.1.0.0: modelplugin/Stratum-1.0.0/modelmain.go modelplug

test: # @HELP run the unit tests and source code validation
test: build deps linters license_check
go test github.com/onosproject/onos-config/pkg/...
go test github.com/onosproject/onos-config/cmd/...
go test github.com/onosproject/onos-config/modelplugin/...
go test -race github.com/onosproject/onos-config/pkg/...
go test -race github.com/onosproject/onos-config/cmd/...
go test -race github.com/onosproject/onos-config/modelplugin/...

coverage: # @HELP generate unit test coverage data
coverage: build deps linters license_check
Expand Down

0 comments on commit f041fb7

Please # to comment.