make test (#1249)
This commit is contained in:
parent
43d5690432
commit
556892cf86
2 changed files with 13 additions and 3 deletions
14
Makefile
14
Makefile
|
@ -61,6 +61,9 @@ LD_OPTS_VARS= \
|
|||
export LD_OPTS=-ldflags "-s -w $(LD_OPTS_VARS)"
|
||||
export LD_OPTS_STATIC=-ldflags "-s -w $(LD_OPTS_VARS) -extldflags '-static'"
|
||||
|
||||
GOCMD=go
|
||||
GOTEST=$(GOCMD) test
|
||||
|
||||
RELDIR = crowdsec-$(BUILD_VERSION)
|
||||
|
||||
.PHONY: all
|
||||
|
@ -89,7 +92,7 @@ goversion:
|
|||
fi
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
clean: testclean
|
||||
@$(MAKE) -C $(CROWDSEC_FOLDER) clean --no-print-directory
|
||||
@$(MAKE) -C $(CSCLI_FOLDER) clean --no-print-directory
|
||||
@$(RM) $(CROWDSEC_BIN)
|
||||
|
@ -101,6 +104,7 @@ clean:
|
|||
@$(RM) $(SPLUNK_PLUGIN_FOLDER)/$(SPLUNK_PLUGIN_BIN)
|
||||
@$(RM) $(EMAIL_PLUGIN_FOLDER)/$(EMAIL_PLUGIN_BIN)
|
||||
|
||||
|
||||
cscli: goversion
|
||||
@GOARCH=$(GOARCH) GOOS=$(GOOS) $(MAKE) -C $(CSCLI_FOLDER) build --no-print-directory
|
||||
|
||||
|
@ -137,8 +141,14 @@ splunk-plugin_static:goversion
|
|||
email-plugin_static:goversion
|
||||
@GOARCH=$(GOARCH) GOOS=$(GOOS) $(MAKE) -C $(EMAIL_PLUGIN_FOLDER) static --no-print-directory
|
||||
|
||||
.PHONY: testclean
|
||||
testclean:
|
||||
@$(RM) pkg/apiserver/ent
|
||||
@$(RM) -r pkg/cwhub/hubdir
|
||||
|
||||
.PHONY: test
|
||||
test: goversion
|
||||
@$(MAKE) -C $(CROWDSEC_FOLDER) test --no-print-directory
|
||||
$(GOTEST) $(LD_OPTS) ./...
|
||||
|
||||
.PHONY: package
|
||||
package:
|
||||
|
|
|
@ -27,7 +27,7 @@ test:
|
|||
$(GOTEST) $(LD_OPTS) -v ./...
|
||||
|
||||
clean:
|
||||
rm -f $(CROWDSEC_BIN)
|
||||
@$(RM) $(CROWDSEC_BIN)
|
||||
|
||||
.PHONY: install
|
||||
install: install-conf install-bin
|
||||
|
|
Loading…
Reference in a new issue