This repository was archived by the owner on Jan 9, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathMakefile
More file actions
66 lines (53 loc) · 1.39 KB
/
Makefile
File metadata and controls
66 lines (53 loc) · 1.39 KB
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
.PHONY: all install build test test_fmt test_govet test_verbose test_lint coveralls it it2 it-verbose it2-verbose clean
all: test coveralls it-verbose it2-verbose
install:
./prifi.sh install
test: install build test_fmt test_govet test_lint
DEBUG_COLOR="True" DEBUG_LVL=1 go test -short ./...
test_fmt:
@echo Checking correct formatting of files...
@{ \
files=$$( go fmt ./... ); \
if [ -n "$$files" ]; then \
echo "Files not properly formatted: $$files"; \
exit 1; \
fi; \
}
build:
@echo Testing build...
@{ \
go build sda/app/prifi.go && rm -f prifi; \
}
test_govet:
@echo Running go vet...
@{ \
if ! go vet ./...; then \
exit 1; \
fi \
}
coveralls:
./coveralls.sh
test_verbose:
DEBUG_COLOR="True" DEBUG_LVL=3 go test -v -race ./...
it:
./test.sh integration
it2:
./test.sh integration2
it-verbose:
./test.sh integration || (cat relay.log; exit 1)
it2-verbose:
./test.sh integration2 || (cat relay.log; exit 1)
clean:
rm -f profile.cov *.log timing.txt prifi-lib/relay/timing.txt
test_lint:
@echo Checking linting of files ...
@{ \
go get -u golang.org/x/lint/golint; \
exclude="_test.go|ALL_CAPS|underscore|should be of the form|.deprecated|and that stutters|error strings should not be capitalized"; \
lintfiles=$$( golint ./... | egrep -v "($$exclude)" ); \
if [ -n "$$lintfiles" ]; then \
echo "Lint errors:"; \
echo "$$lintfiles"; \
exit 1; \
fi \
}