mirror of
https://github.com/henrydcase/nobs.git
synced 2024-11-22 15:18:57 +00:00
improves makefile
This commit is contained in:
parent
34805fc1fb
commit
2a25a09b4a
@ -2,4 +2,7 @@ sudo: required
|
||||
language: go
|
||||
|
||||
script:
|
||||
- make test
|
||||
- NOASM=0 make test
|
||||
- NOASM=1 make test
|
||||
- NOASM=0 make cover
|
||||
- NOASM=1 make cover
|
||||
|
13
Makefile
13
Makefile
@ -5,6 +5,11 @@ GOPATH_LOCAL = $(PRJ_DIR)/build/
|
||||
GOPATH_DIR = src/github.com/henrydcase/nobs
|
||||
VENDOR_DIR = tls_vendor
|
||||
OPTS ?=
|
||||
NOASM ?=
|
||||
|
||||
ifeq ($(NOASM),1)
|
||||
OPTS+=$(OPTS_TAGS)
|
||||
endif
|
||||
|
||||
TARGETS=\
|
||||
dh\
|
||||
@ -18,9 +23,15 @@ prep-%:
|
||||
|
||||
make_dirs:
|
||||
mkdir -p $(GOPATH_LOCAL)/$(GOPATH_DIR)
|
||||
cp -rf etc $(GOPATH_LOCAL)/$(GOPATH_DIR)
|
||||
|
||||
test: clean make_dirs $(addprefix prep-,$(TARGETS))
|
||||
GOPATH=$(GOPATH_LOCAL) go test -v ./...
|
||||
cd $(GOPATH_LOCAL); GOPATH=$(GOPATH_LOCAL) go test $(OPTS) -v ./...
|
||||
|
||||
cover:
|
||||
cd $(GOPATH_LOCAL); GOPATH=$(GOPATH_LOCAL) go test \
|
||||
-race -coverprofile=coverage_$(NOASM).txt -covermode=atomic $(OPTS) -v ./...
|
||||
cat $(GOPATH_LOCAL)/coverage_$(NOASM).txt >> coverage.txt
|
||||
|
||||
clean:
|
||||
rm -rf $(GOPATH_LOCAL)
|
||||
|
Loading…
Reference in New Issue
Block a user