You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1234567891011121314151617181920212223242526272829303132333435363738
  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