2015-06-27 04:06:17 +08:00
|
|
|
RUNC_TEST_IMAGE=runc_test
|
|
|
|
PROJECT=github.com/opencontainers/runc
|
2015-07-01 04:05:13 +08:00
|
|
|
TEST_DOCKERFILE=script/test_Dockerfile
|
2015-08-22 06:25:26 +08:00
|
|
|
BUILDTAGS=seccomp
|
2015-07-01 02:07:56 +08:00
|
|
|
export GOPATH:=$(CURDIR)/Godeps/_workspace:$(GOPATH)
|
2015-06-27 04:06:17 +08:00
|
|
|
|
2015-06-22 10:31:12 +08:00
|
|
|
all:
|
2015-08-22 06:25:26 +08:00
|
|
|
go build -tags "$(BUILDTAGS)" -o runc .
|
2015-06-27 04:06:17 +08:00
|
|
|
|
2015-11-15 08:33:52 +08:00
|
|
|
static:
|
|
|
|
CGO_ENABLED=1 go build -tags "$(BUILDTAGS) cgo static_build" -ldflags "-w -extldflags -static" -o runc .
|
|
|
|
|
2015-07-01 03:51:09 +08:00
|
|
|
vet:
|
2015-06-27 04:06:17 +08:00
|
|
|
go get golang.org/x/tools/cmd/vet
|
2015-07-01 03:51:09 +08:00
|
|
|
|
|
|
|
lint: vet
|
2015-06-27 04:06:17 +08:00
|
|
|
go vet ./...
|
|
|
|
go fmt ./...
|
|
|
|
|
|
|
|
runctestimage:
|
|
|
|
docker build -t $(RUNC_TEST_IMAGE) -f $(TEST_DOCKERFILE) .
|
|
|
|
|
|
|
|
test: runctestimage
|
2015-07-29 06:37:40 +08:00
|
|
|
docker run -e TESTFLAGS --privileged --rm -v $(CURDIR):/go/src/$(PROJECT) $(RUNC_TEST_IMAGE) make localtest
|
2015-06-27 04:06:17 +08:00
|
|
|
|
|
|
|
localtest:
|
2015-08-22 06:25:26 +08:00
|
|
|
go test -tags "$(BUILDTAGS)" ${TESTFLAGS} -v ./...
|
|
|
|
|
2015-06-22 10:31:12 +08:00
|
|
|
|
2015-06-30 04:33:15 +08:00
|
|
|
install:
|
2015-06-22 10:31:12 +08:00
|
|
|
cp runc /usr/local/bin/runc
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm runc
|
2015-07-01 03:51:09 +08:00
|
|
|
|
|
|
|
validate: vet
|
|
|
|
script/validate-gofmt
|
|
|
|
go vet ./...
|
|
|
|
|
|
|
|
ci: validate localtest
|