summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorCorey Hulen <corey@hulen.com>2017-04-04 11:42:07 -0700
committerHarrison Healey <harrisonmhealey@gmail.com>2017-04-04 14:42:07 -0400
commit6bf080393d88534aa658ecaff32ae089bd304772 (patch)
treebe25ba4cea3d687d11fe49537b84fae4bf21a484 /Makefile
parent32460bf63bc07c69ee5da0bb5640b879facb5538 (diff)
downloadchat-6bf080393d88534aa658ecaff32ae089bd304772.tar.gz
chat-6bf080393d88534aa658ecaff32ae089bd304772.tar.bz2
chat-6bf080393d88534aa658ecaff32ae089bd304772.zip
Fixing race conditions in the code base (#5966)
* Adding initial race detector * Remove setting of config twice * Fixing config file watch and config reload on license save * Fixing config file watch and config reload on license save * Fixing build error * Fixing locking issue * Fixing makefile * Fixing race in config * Fixing race in status unit test * Adding EE race tests * Fixing race in cluster info * Removing code that's isn't needed * Fixing some more races * Fixing govet issue
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile33
1 files changed, 33 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 580f0c34d..dc1290745 100644
--- a/Makefile
+++ b/Makefile
@@ -190,6 +190,39 @@ check-server-style: govet
check-style: check-client-style check-server-style
+
+test-te-race: start-docker prepare-enterprise
+ @echo Testing TE race conditions
+
+ @echo "Packages to test: "$(TE_PACKAGES)
+
+ @for package in $(TE_PACKAGES); do \
+ echo "Testing "$$package; \
+ $(GO) test $(GOFLAGS) -race -run=$(TESTS) -test.v -test.timeout=3000s $$package || exit 1; \
+ done
+
+test-ee-race: start-docker prepare-enterprise
+ @echo Testing EE race conditions
+
+ifeq ($(BUILD_ENTERPRISE_READY),true)
+ @echo "Packages to test: "$(EE_PACKAGES)
+
+ for package in $(EE_PACKAGES); do \
+ echo "Testing "$$package; \
+ $(GO) test $(GOFLAGS) -race -run=$(TESTS) -c $$package; \
+ if [ -f $$(basename $$package).test ]; then \
+ echo "Testing "$$package; \
+ ./$$(basename $$package).test -test.v -test.timeout=2000s || exit 1; \
+ rm -r $$(basename $$package).test; \
+ fi; \
+ done
+
+ rm -f config/*.crt
+ rm -f config/*.key
+endif
+
+test-server-race: test-te-race test-ee-race
+
test-te: start-docker prepare-enterprise
@echo Testing TE