-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
42 lines (33 loc) · 1.09 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
build:
go build ./...
win-build-cross-all:
go build ./...
cd tests && go test -o ../tests.exe -c -covermode=atomic -coverprofile=c.out -coverpkg=../...
win-build:
env GOOS=windows GOARCH=amd64 CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc make win-build-cross-all
win-run-tests:
env GOOS=windows GOARCH=amd64 CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc make win-build-cross-all
wine ./tests.exe -test.v=true -test.coverprofile=c.out
make run-tests-2
run-tests-1:
cd tests && go test -o ../tests.test -c -covermode=atomic -coverprofile=c.out -coverpkg=../...
./tests.test -test.v=true -test.coverprofile=c.out
run-tests-2:
sed -i -e 's:go4ml.xyz/dyl/::g' c.out
sed -i -e '\:tests/:d' c.out
awk '/\.go/{print "go4ml.xyz/dyl/"$$0}/^mode/{print $$0}' < c.out > gocov.txt
run-tests: run-tests-1 run-tests-2
run-cover:
go tool cover -html=gocov.txt
run-cover-tests: run-tests run-cover
run-cover-all:
make run-tests-1
cp c.out c1.out
make win-run-tests
mv c.out c2.out
cp c1.out c3.out
tail -n +2 c2.out >> c3.out
head -n 1 c3.out > c.out
tail -n +2 c3.out | sort >> c.out
make run-tests-2
make run-cover