aboutsummaryrefslogtreecommitdiffstats
path: root/test/security/k8s
diff options
context:
space:
mode:
authorPawel Wieczorek <p.wieczorek2@samsung.com>2019-08-07 13:52:49 +0200
committerPawel Wieczorek <p.wieczorek2@samsung.com>2019-08-07 14:35:08 +0200
commit2b2b7990ed1f14664cc745078f9540345a16e7c5 (patch)
tree3aaf5112c735eca337c37d5f4875da8b7f2ed099 /test/security/k8s
parentab8186eb931abc8ae8664d377e8e7685c4cb2292 (diff)
k8s: Add Makefile targets for testing
Issue-ID: SECCOM-235 Change-Id: I6ac5f3c160f1cd1d8faac90576ab943d4ed213a5 Signed-off-by: Pawel Wieczorek <p.wieczorek2@samsung.com>
Diffstat (limited to 'test/security/k8s')
-rw-r--r--test/security/k8s/.gitignore3
-rw-r--r--test/security/k8s/Makefile19
2 files changed, 19 insertions, 3 deletions
diff --git a/test/security/k8s/.gitignore b/test/security/k8s/.gitignore
index 6f63a3aa1..fa33cf82a 100644
--- a/test/security/k8s/.gitignore
+++ b/test/security/k8s/.gitignore
@@ -5,3 +5,6 @@
/pkg/
/src/*
!/src/check/
+
+# Additional Go utilities
+/bin/ginkgo
diff --git a/test/security/k8s/Makefile b/test/security/k8s/Makefile
index e7f978fc2..931b83bc5 100644
--- a/test/security/k8s/Makefile
+++ b/test/security/k8s/Makefile
@@ -24,12 +24,25 @@ clean_deps:
go clean -i -r $(PROJECT)/... 2>/dev/null || true
test: export GOPATH = $(shell pwd)
-test:
+test: test_deps
go test $(PROJECT)/...
-clean: clean_deps
+test_watch: export GOPATH = $(shell pwd)
+test_watch: test_deps
+ $(BIN_DIR)/ginkgo watch $(SRC_DIR)/$(PROJECT)/...
+
+test_deps: export GOPATH = $(shell pwd)
+test_deps:
+ go get github.com/onsi/ginkgo/ginkgo
+ go get -t $(PROJECT)/...
+
+clean_test_deps: export GOPATH = $(shell pwd)
+clean_test_deps:
+ go clean -i -r github.com/onsi/ginkgo/ginkgo 2>/dev/null || true
+
+clean: clean_deps clean_test_deps
-rmdir $(BIN_DIR)
rm -rf $(PKG_DIR)
find $(SRC_DIR) -mindepth 1 -maxdepth 1 ! -name $(PROJECT) -exec rm -rf {} +
-.PHONY: all run build deps clean_deps test clean $(BIN)
+.PHONY: all run build deps clean_deps test test_watch test_deps clean_test_deps clean $(BIN)