blob: 6d7abd62df8eeaad21a6e1d90de4183db78706ef (
plain)
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
112
113
|
.PHONY: all clean edit editor test test2 back report report2 parser2 benchmarks benchmarks2 mem memgo race nreport build_all_targets
all:
build_all_targets:
GOOS=darwin GOARCH=amd64 go test -c -o /dev/null
GOOS=darwin GOARCH=arm64 go test -c -o /dev/null
GOOS=freebsd GOARCH=386 go test -c -o /dev/null
GOOS=freebsd GOARCH=amd64 go test -c -o /dev/null
GOOS=freebsd GOARCH=arm go test -c -o /dev/null
GOOS=freebsd GOARCH=arm64 go test -c -o /dev/null
GOOS=illumos GOARCH=amd64 go test -c -o /dev/null
GOOS=linux GOARCH=386 go test -c -o /dev/null
GOOS=linux GOARCH=amd64 go test -c -o /dev/null
GOOS=linux GOARCH=arm go test -c -o /dev/null
GOOS=linux GOARCH=arm64 go test -c -o /dev/null
GOOS=linux GOARCH=ppc64le go test -c -o /dev/null
GOOS=linux GOARCH=riscv64 go test -c -o /dev/null
GOOS=linux GOARCH=s390x go test -c -o /dev/null
GOOS=netbsd GOARCH=386 go test -c -o /dev/null
GOOS=netbsd GOARCH=amd64 go test -c -o /dev/null
GOOS=netbsd GOARCH=arm go test -c -o /dev/null
GOOS=openbsd GOARCH=386 go test -c -o /dev/null
GOOS=openbsd GOARCH=amd64 go test -c -o /dev/null
GOOS=openbsd GOARCH=arm64 go test -c -o /dev/null
GOOS=windows GOARCH=386 go test -c -o /dev/null
GOOS=windows GOARCH=amd64 go test -c -o /dev/null
GOOS=windows GOARCH=arm64 go test -c -o /dev/null
clean:
rm -f cpu.test mem.test *.out
go clean
edit:
@touch log
@if [ -f "Session.vim" ]; then gvim -S & else gvim -p Makefile all_test.go gc.go & fi
editor:
gofmt -l -s -w *.go
go test -c -o /dev/null 2>&1 | tee log-editor
race:
go test -v -failfast -heap -race 2>&1 | tee log-test
@git diff testdata/ || true
@git status
@grep TOTAL log-test || true
grep 'FAIL\|TODO' log-test || true
test:
go test -v -failfast -trctodo -exterr -heap 2>&1 | tee log-test
@git diff testdata/ || true
@git status
@grep TOTAL log-test || true
grep 'FAIL\|TODO' log-test || true
test2:
go test -v -failfast -trctodo -exterr -src $$HOME/src 2>&1 | tee log-test2
@git diff testdata/ || true
@git status
@grep TOTAL log-test2 || true
grep 'FAIL\|TODO' log-test2 || true
parser2:
go test -v -failfast -run TestParser -src $$HOME/src 2>&1 | tee log-parser2
@git diff testdata/ || true
@git status
@grep TOTAL log-parser2 || true
grep 'FAIL\|TODO' log-parser2 || true
back:
go test -v -failfast -noback 2>&1 | tee log-back
@git diff testdata/ || true
@git status
@grep TOTAL log-back || true
grep 'FAIL\|TODO' log-back || true
nreport:
touch log-nreport
cp log-nreport log-nreport0
go test -v -failfast -run TestParser -heap -nreport 2>&1 | tee log-nreport
@git diff testdata/ || true
@git status
@grep TOTAL log-report || true
grep 'FAIL\|TODO' log-report || true
report:
go test -v -failfast -run TestParser -report 2>&1 | tee log-report
@git diff testdata/ || true
@git status
@grep TOTAL log-report || true
grep 'FAIL\|TODO' log-report || true
report2:
go test -v -failfast -run TestParser -src $$HOME/src -report 2>&1 | tee log-report2
@git diff testdata/ || true
@git status
@grep TOTAL log-report2 || true
grep 'FAIL\|TODO' log-report2 || true
benchmarks:
go test -v -run @ -bench . 2>&1 | tee log-benchmarks
benchmarks2:
go test -v -run @ -bench . -bsrc $$HOME/src 2>&1 | tee log-benchmarks2
mem:
go test -run @ -bench BenchmarkParser -memprofile mem.out
go tool pprof --lines --alloc_space *.test mem.out
memgo:
go test -run @ -bench BenchmarkGoParser -memprofile mem.out
go tool pprof --lines --alloc_space *.test mem.out
|