From 697659b8128e04d8857b870bea90d39ae079ef4e Mon Sep 17 00:00:00 2001 From: ChengTiesheng Date: Fri, 22 Jan 2016 10:30:47 +0800 Subject: [PATCH 1/2] Add make test for Makefile Signed-off-by: ChengTiesheng --- Makefile | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Makefile b/Makefile index c7a922737..49f38083a 100644 --- a/Makefile +++ b/Makefile @@ -35,3 +35,17 @@ downloads/stage3-amd64-current.tar.bz2: get-stage3.sh clean: rm -f ocitools runtimetest downloads/* sudo rm -rf rootfs + +.PHONY: test .gofmt .govet .golint + +test: .gofmt .govet .golint + +.gofmt: + go fmt ./... + +.govet: + go vet -x ./... + +.golint: + golint ./... + From fc1d1fe63a3d0120f2b272214bd082359c9fbae2 Mon Sep 17 00:00:00 2001 From: ChengTiesheng Date: Fri, 22 Jan 2016 10:32:49 +0800 Subject: [PATCH 2/2] Fix gofmt issue Signed-off-by: ChengTiesheng --- cmd/runtimetest/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/runtimetest/main.go b/cmd/runtimetest/main.go index 48d76358b..f1a1c6043 100644 --- a/cmd/runtimetest/main.go +++ b/cmd/runtimetest/main.go @@ -144,7 +144,7 @@ func validateCapabilities(spec *specs.LinuxSpec, rspec *specs.LinuxRuntimeSpec) if expectedSet != actuallySet { if expectedSet { return fmt.Errorf("Expected Capability %v not set for process", cap.String()) - } + } return fmt.Errorf("Unexpected Capability %v set for process", cap.String()) } }