forked from openedx-unsupported/configuration
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtest.mk
More file actions
26 lines (16 loc) · 687 Bytes
/
test.mk
File metadata and controls
26 lines (16 loc) · 687 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
yml_files:=$(shell find . -name "*.yml")
json_files:=$(shell find . -name "*.json")
jinja_files:=$(shell find . -name "*.j2")
test: test.syntax test.edx_east_roles
test.syntax: test.syntax.yml test.syntax.json test.syntax.jinja
test.syntax.yml: $(patsubst %,test.syntax.yml/%,$(yml_files))
test.syntax.yml/%:
python -c "import sys,yaml; yaml.load(open(sys.argv[1]))" $* >/dev/null
test.syntax.json: $(patsubst %,test.syntax.json/%,$(json_files))
test.syntax.json/%:
jsonlint -v $*
test.syntax.jinja: $(patsubst %,test.syntax.jinja/%,$(jinja_files))
test.syntax.jinja/%:
cd playbooks && python ../tests/jinja_check.py ../$*
test.edx_east_roles:
tests/test_edx_east_roles.sh