This repository was archived by the owner on Jun 9, 2026. It is now read-only.
forked from cockroachdb/pebble
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
56 lines (48 loc) · 1.26 KB
/
Copy pathMakefile
File metadata and controls
56 lines (48 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
GO := go
PKG := ./...
GOFLAGS :=
STRESSFLAGS :=
TAGS := invariants
TESTS := .
.PHONY: all
all:
@echo usage:
@echo " make test"
@echo " make testrace"
@echo " make stress"
@echo " make stressrace"
@echo " make stressmeta"
@echo " make mod-update"
@echo " make clean"
override testflags :=
.PHONY: test
test:
${GO} test -mod=vendor -tags '$(TAGS)' ${testflags} -run ${TESTS} ${PKG}
.PHONY: testrace
testrace: testflags += -race
testrace: test
.PHONY: stress stressrace
stressrace: testflags += -race
stress stressrace: testflags += -exec 'stress ${STRESSFLAGS}' -timeout 0 -test.v
stress stressrace: test
.PHONY: stressmeta
stressmeta: override PKG = ./internal/metamorphic
stressmeta: override STRESSFLAGS += -p 1
stressmeta: override TESTS = TestMeta$$
stressmeta: stress
.PHONY: generate
generate:
${GO} generate -mod=vendor ${PKG}
# The cmd/pebble/{badger}.go file causes various "false" dependencies
# to be pulled in which is undesirable. Hack around this by
# temporarily hiding those files.
mod-update:
mkdir -p cmd/pebble/_bak
mv cmd/pebble/{badger}.go cmd/pebble/_bak
${GO} get -u
${GO} mod tidy
${GO} mod vendor
mv cmd/pebble/_bak/* cmd/pebble && rmdir cmd/pebble/_bak
.PHONY: clean
clean:
rm -f $(patsubst %,%.test,$(notdir $(shell go list ${PKG})))