forked from docker/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request docker#21593 from aboch/bdvnd
Vendoring boltb/bolt v1.2.0
- Loading branch information
Showing
18 changed files
with
637 additions
and
335 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,18 @@ | ||
TEST=. | ||
BENCH=. | ||
COVERPROFILE=/tmp/c.out | ||
BRANCH=`git rev-parse --abbrev-ref HEAD` | ||
COMMIT=`git rev-parse --short HEAD` | ||
GOLDFLAGS="-X main.branch $(BRANCH) -X main.commit $(COMMIT)" | ||
|
||
default: build | ||
|
||
bench: | ||
go test -v -test.run=NOTHINCONTAINSTHIS -test.bench=$(BENCH) | ||
|
||
# http://cloc.sourceforge.net/ | ||
cloc: | ||
@cloc --not-match-f='Makefile|_test.go' . | ||
|
||
cover: fmt | ||
go test -coverprofile=$(COVERPROFILE) -test.run=$(TEST) $(COVERFLAG) . | ||
go tool cover -html=$(COVERPROFILE) | ||
rm $(COVERPROFILE) | ||
|
||
cpuprofile: fmt | ||
@go test -c | ||
@./bolt.test -test.v -test.run=$(TEST) -test.cpuprofile cpu.prof | ||
race: | ||
@go test -v -race -test.run="TestSimulate_(100op|1000op)" | ||
|
||
# go get github.com/kisielk/errcheck | ||
errcheck: | ||
@echo "=== errcheck ===" | ||
@errcheck github.com/boltdb/bolt | ||
@errcheck -ignorepkg=bytes -ignore=os:Remove github.com/boltdb/bolt | ||
|
||
fmt: | ||
@go fmt ./... | ||
|
||
get: | ||
@go get -d ./... | ||
|
||
build: get | ||
@mkdir -p bin | ||
@go build -ldflags=$(GOLDFLAGS) -a -o bin/bolt ./cmd/bolt | ||
|
||
test: fmt | ||
@go get github.com/stretchr/testify/assert | ||
@echo "=== TESTS ===" | ||
@go test -v -cover -test.run=$(TEST) | ||
@echo "" | ||
@echo "" | ||
@echo "=== CLI ===" | ||
@go test -v -test.run=$(TEST) ./cmd/bolt | ||
@echo "" | ||
@echo "" | ||
@echo "=== RACE DETECTOR ===" | ||
@go test -v -race -test.run="TestSimulate_(100op|1000op)" | ||
test: | ||
@go test -v -cover . | ||
@go test -v ./cmd/bolt | ||
|
||
.PHONY: bench cloc cover cpuprofile fmt memprofile test | ||
.PHONY: fmt test |
Oops, something went wrong.