2015-06-27 04:06:17 +08:00
|
|
|
RUNC_TEST_IMAGE=runc_test
|
|
|
|
PROJECT=github.com/opencontainers/runc
|
|
|
|
TEST_DOCKERFILE=test_Dockerfile
|
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-06-27 04:06:17 +08:00
|
|
|
go build -o runc .
|
|
|
|
|
|
|
|
lint:
|
|
|
|
go get golang.org/x/tools/cmd/vet
|
|
|
|
go vet ./...
|
|
|
|
go fmt ./...
|
|
|
|
|
|
|
|
runctestimage:
|
|
|
|
docker build -t $(RUNC_TEST_IMAGE) -f $(TEST_DOCKERFILE) .
|
|
|
|
|
|
|
|
test: runctestimage
|
|
|
|
docker run --privileged --rm -v $(CURDIR):/go/src/$(PROJECT) $(RUNC_TEST_IMAGE) make localtest
|
|
|
|
|
|
|
|
localtest:
|
|
|
|
go test -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
|