From 5bc1360d89962aad63cbc71826902e60779ed873 Mon Sep 17 00:00:00 2001 From: Marcos Lilljedahl Date: Tue, 28 Jul 2015 19:37:40 -0300 Subject: [PATCH] Add TESTFLAGS to Makefile targets This commit allows to send `go test` arguments to current makefile `test` and `localtest` targets. A usage example would be `make test TESTFLAGS="-run=SomeTestFunction"` to easily run a single test function. Signed-off-by: Marcos Lilljedahl --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index d576d089..09d28f28 100644 --- a/Makefile +++ b/Makefile @@ -17,10 +17,10 @@ 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 + docker run -e TESTFLAGS --privileged --rm -v $(CURDIR):/go/src/$(PROJECT) $(RUNC_TEST_IMAGE) make localtest localtest: - go test -v ./... + go test ${TESTFLAGS} -v ./... install: cp runc /usr/local/bin/runc