Module: check_mk
Branch: master
Commit: 9097e91849aa34d2d39f2a25d349e541db01750c
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=9097e91849aa34…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Feb 11 20:55:56 2019 +0100
Ensure node_modules are up-to-date before running GUI crawl tests
Without this change the .f12 calls, which are executed as root, would
update the node_modules. This leads to failures and to root owned files
in the working copy.
Change-Id: I8809ecdff07f502b342c340946366103d2e84c90
---
tests/Makefile | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/tests/Makefile b/tests/Makefile
index c355b99..a9ce6fe 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -1,5 +1,6 @@
SHELL := /bin/bash -e
VENV := ../.venv
+NODE_MODULES := ../node_modules
PIPENV := PIPENV_VENV_IN_PROJECT=true pipenv
BANDIT := $(PIPENV) run bandit
COVERAGE := $(PIPENV) run coverage
@@ -32,6 +33,9 @@ help:
$(VENV):
$(MAKE) -C $(dir $(VENV)) $(notdir $(VENV))
+$(NODE_MODULES):
+ $(MAKE) -C $(dir $(NODE_MODULES)) $(notdir $(NODE_MODULES))
+
bandit.ini:
echo -e "[bandit]\ntargets: $$(./find-python-files | tr '\n' ',' |
sed 's/,$$//')" > bandit.ini
@@ -59,7 +63,7 @@ test-format-python: $(VENV) ../.style.yapf
grep '^+++ .*(reformatted)$$' | \
sed -e 's/^+++ //' -e 's/[[:blank:]]*(reformatted)$$/:1:1: error: file needs
formatting/'
-test-gui-crawl: $(VENV)
+test-gui-crawl: $(VENV) $(NODE_MODULES)
$(PYTEST) -T gui_crawl $(realpath integration/cmk/gui/test_crawl.py)
test-integration: $(VENV)