summaryrefslogtreecommitdiff
path: root/vendor/github.com/seccomp/libseccomp-golang/Makefile
blob: 38cfa852cd6add6461cc8a8542e2d5f4ece87bef (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
# libseccomp-golang

.PHONY: all check check-build check-syntax fix-syntax vet test lint

all: check-build

check: vet test

check-build:
	go build

check-syntax:
	gofmt -d .

fix-syntax:
	gofmt -w .

vet:
	go vet -v

# Previous bugs have made the tests freeze until the timeout. Golang default
# timeout for tests is 10 minutes, which is too long, considering current tests
# can be executed in less than 1 second. Reduce the timeout, so problems can
# be noticed earlier in the CI.
TEST_TIMEOUT=10s

test:
	go test -v -timeout $(TEST_TIMEOUT)

lint:
	@$(if $(shell which golint),true,$(error "install golint and include it in your PATH"))
	golint -set_exit_status