-
Notifications
You must be signed in to change notification settings - Fork 22
/
Makefile
48 lines (35 loc) · 1.17 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
# gather options for tests
TESTARGS=$(TESTOPTIONS)
deps: deps-secp256k1
deps-secp256k1:
cd secp256k1/c-secp256k1 && ./autogen.sh && ./configure --enable-experimental --enable-module-ecdh --enable-module-recovery && make -j4 && cd ..
deps-1:
cd secp256k1/c-secp256k1 && make -j4 && cd ..
test: test-cleanup test-secp256k1
test-race: test-race-secp256k1
test-cleanup: test-cleanup-coverage test-cleanup-profile
test-cleanup-coverage:
rm -rf coverage/ 2>> /dev/null; \
mkdir coverage/
test-cleanup-profile:
rm -rf profile/ 2>> /dev/null; \
mkdir profile/
test-secp256k1: test-cleanup
go test -coverprofile=coverage/secp256k1.out -v \
github.com/btccom/secp256k1-go/secp256k1... \
$(TESTARGS)
test-race-secp256k1:
go test -race -v \
github.com/btccom/secp256k1-go/secp256k1... \
$(TESTARGS)
sanity: build-test test
# concat all coverage reports together
coverage-concat:
echo "mode: set" > coverage/full && \
grep -h -v "^mode:" coverage/*.out >> coverage/full
# full coverage report
coverage: coverage-concat
go tool cover -func=coverage/full $(COVERAGEARGS)
# full coverage report
coverage-html: coverage-concat
go tool cover -html=coverage/full $(COVERAGEARGS)