本站源代码
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

39 lignes
1.2KB

  1. BRANCH=`git rev-parse --abbrev-ref HEAD`
  2. COMMIT=`git rev-parse --short HEAD`
  3. GOLDFLAGS="-X main.branch $(BRANCH) -X main.commit $(COMMIT)"
  4. default: build
  5. race:
  6. @TEST_FREELIST_TYPE=hashmap go test -v -race -test.run="TestSimulate_(100op|1000op)"
  7. @echo "array freelist test"
  8. @TEST_FREELIST_TYPE=array go test -v -race -test.run="TestSimulate_(100op|1000op)"
  9. fmt:
  10. !(gofmt -l -s -d $(shell find . -name \*.go) | grep '[a-z]')
  11. # go get honnef.co/go/tools/simple
  12. gosimple:
  13. gosimple ./...
  14. # go get honnef.co/go/tools/unused
  15. unused:
  16. unused ./...
  17. # go get github.com/kisielk/errcheck
  18. errcheck:
  19. @errcheck -ignorepkg=bytes -ignore=os:Remove go.etcd.io/bbolt
  20. test:
  21. TEST_FREELIST_TYPE=hashmap go test -timeout 20m -v -coverprofile cover.out -covermode atomic
  22. # Note: gets "program not an importable package" in out of path builds
  23. TEST_FREELIST_TYPE=hashmap go test -v ./cmd/bbolt
  24. @echo "array freelist test"
  25. @TEST_FREELIST_TYPE=array go test -timeout 20m -v -coverprofile cover.out -covermode atomic
  26. # Note: gets "program not an importable package" in out of path builds
  27. @TEST_FREELIST_TYPE=array go test -v ./cmd/bbolt
  28. .PHONY: race fmt errcheck test gosimple unused
上海开阖软件有限公司 沪ICP备12045867号-1