forked from dedis/cothority
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
46 lines (39 loc) · 1.01 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
all: test
test_fmt:
@echo Checking correct formatting of files
@{ \
files=$$( go fmt ./... ); \
if [ -n "$$files" ]; then \
echo "Files not properly formatted: $$files"; \
exit 1; \
fi; \
if ! go vet ./...; then \
exit 1; \
fi \
}
test_lint:
@echo Checking linting of files
@{ \
go get -u github.com/golang/lint/golint; \
exclude="byzcoin|_test.go"; \
lintfiles=$$( golint ./... | egrep -v "($$exclude)" ); \
if [ -n "$$lintfiles" ]; then \
echo "Lint errors:"; \
echo "$$lintfiles"; \
exit 1; \
fi \
}
# You can use `test_playground` to run any test or part of cothority
# for more than once in Travis. Change `make test` in .travis.yml
# to `make test_playground`.
test_playground:
cd skipchain; \
for a in $$( seq 10 ); do \
go test -v -race -short || exit 1 ; \
done;
test_verbose:
go test -v -race -short ./...
# use test_verbose instead if you want to use this Makefile locally
test_go:
./coveralls.sh ./cosi ./cisc ./byzcoin/* ./jvss/simulation
test: test_fmt test_lint test_go