Module: check_mk
Branch: master
Commit: 7bf62ec21d29363fe01ae943e01a73b19f240e0f
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=7bf62ec21d2936…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Nov 7 22:00:22 2016 +0100
Fixed path issues in test-bandit-ci target
---
tests/Makefile | 24 ++++++++++++++----------
1 file changed, 14 insertions(+), 10 deletions(-)
diff --git a/tests/Makefile b/tests/Makefile
index b6cbcc9..0baa9ae 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -1,10 +1,11 @@
SHELL=/bin/bash
help:
- @echo "test - Run all tests"
- @echo "test-pylint - Run pylint based tests"
- @echo "test-bandit - Run bandit (security) tests"
- @echo "setup - Install dependencies"
+ @echo "test - Run all tests"
+ @echo "test-pylint - Run pylint based tests"
+ @echo "test-pylint-ci - Run pylint based tests within Jenkins"
+ @echo "test-bandit-ci - Run bandit (security) tests within Jenkins"
+ @echo "setup - Install dependencies"
test:
py.test
@@ -12,17 +13,20 @@ test:
test-pylint:
py.test -k pylint
-test-bandit:
+test-bandit-ci:
# Currently only care about high severity reported issues. Once this is
# reached, go and enable the medium/low checks.
+ CMK_DIR="$(realpath ..)" ; \
+ CMC_DIR="$(realpath ..)" ; \
bandit \
- -c ../bandit.yaml \
+ -c "$$CMK_DIR/bandit.yaml" \
-r \
- -f xml -o $$WORKDIR/bandit_results.xml \
+ -f xml -o "$$WORKDIR/bandit_results.xml" \
-lll \
- $(realpath ..) \
- $(realpath ..)/{checks,inventory}/* \
- $(realpath ../cmc/)
+ "$$CMK_DIR" \
+ "$$CMK_DIR/checks/*" \
+ "$$CMK_DIR/inventory/*" \
+ "$$CMC_DIR"
test-pylint-ci: