-
Notifications
You must be signed in to change notification settings - Fork 28
/
Makefile
111 lines (98 loc) · 2.98 KB
/
Makefile
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
SHELL := /bin/bash -euo pipefail
VDLPATH ?= $(shell pwd)
export VDLPATH
vdlgen:
go run v.io/x/ref/cmd/vdl generate --show-warnings=true --lang=go v.io/...
go generate ./v23/vdl/vdltest
vdlroot:
export VDLROOT=$$(pwd)/v23/vdlroot ; \
cd v23/vdlroot && \
go run v.io/x/ref/cmd/vdl generate --show-warnings=false --lang=go \
./vdltool \
./math \
./time \
./signature
.PHONY: test
test:
@echo "VDLPATH" "${VDLPATH}"
go install golang.org/x/tools/cmd/goimports@latest
go test ./...
cd ./x/ref/examples && go test ./...
.PHONY: test-integration
test-integration:
@echo "VDLPATH" "${VDLPATH}"
go test \
v.io/x/ref/cmd/principal \
v.io/x/ref/runtime/internal \
v.io/x/ref/runtime/internal/rpc/test \
v.io/x/ref/services/xproxy/xproxyd \
v.io/x/ref/services/mounttable/mounttabled \
v.io/x/ref/services/debug/debug \
v.io/x/ref/test/hello \
-v23.tests
cd ./x/ref/examples && go test \
v.io/x/ref/examples/tunnel/tunneld \
v.io/x/ref/examples/rps/rpsbot \
--v23.tests
test-openssl-integration:
@echo "VDLPATH" "${VDLPATH}"
go test v.io/v23/security/... -tags openssl
go test v.io/x/ref/lib/security/... -tags openssl
BENCHMARK_MODULES=./v23/security \
./v23/context \
./v23/uniqueid \
./v23/vdl \
./v23/vom \
./v23/naming \
./x/ref/runtime/internal/lib/deque \
./x/ref/runtime/internal/flow/manager \
./x/ref/lib/stats/counter \
# Currently this benchmark fails.
# ./x/ref/runtime/internal/lib/sync
benchmarks:
for m in $(BENCHMARK_MODULES); do \
go test -v -run='\^$\' --bench=. $$m; \
done
cd ./x/ref/runtime/internal/rpc/benchmark && \
go test -v -run='\^$\' --bench=.
refresh:
go generate ./...
go get cloudeng.io/go/cmd/goannotate
go install cloudeng.io/go/cmd/goannotate
go run cloudeng.io/go/cmd/goannotate --config=vanadium-code-annotations.yaml --annotation=copyright ./...
go mod tidy
bootstrapvdl:
rm -f $$(find . -name '*.vdl.go')
export VDLROOT=$$(pwd)/v23/vdlroot ; \
cd v23/vdlroot && \
echo "bootstrapping vdlroot/vdltool" && \
go run -tags vdltoolbootstrapping \
v.io/x/ref/cmd/vdl generate --lang=go ./vdltool && \
echo "bootstrapping vdlroot/{math,time,signature} and v.io/v23/vdl" && \
go run -tags vdlbootstrapping \
v.io/x/ref/cmd/vdl generate --lang=go \
./math \
./time \
./signature \
v.io/v23/vdl
echo "generating all other vdl files...."
go run v.io/x/ref/cmd/vdl generate --lang=go \
v.io/v23/uniqueid \
v.io/v23/vtrace \
v.io/v23/verror
go generate ./v23/vdl/vdltest
go run v.io/x/ref/cmd/vdl generate --show-warnings=true --lang=go v.io/...
git diff --exit-code
SUB_MODULES=./x/ref/runtime/internal/rpc/benchmark/go.mod \
./x/ref/internal/logger/go.mod \
./x/ref/examples/go.mod \
./x/ref/lib/flags/sitedefaults/go.mod \
./x/ref/aws/go.mod
modtidy:
for modfile in $(SUB_MODULES); do \
(cd $$(dirname $$modfile); echo "go mod tidy in $$(pwd)"; go mod tidy) ; \
done
modupdate:
for modfile in $(SUB_MODULES); do \
(cd $$(dirname $$modfile); echo "go get -u ./... in $$(pwd)"; go get -u ./...) ; \
done