test.mk 706 Bytes
Newer Older
1 2 3

yml_files:=$(shell find . -name "*.yml")
json_files:=$(shell find . -name "*.json")
4
# $(images) is calculated in the docker.mk file
5 6 7

test: test.syntax test.edx_east_roles

8
test.syntax: test.syntax.yml test.syntax.json test.syntax.dockerfiles
9 10 11 12 13 14 15 16 17 18 19

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 $*

20 21 22
test.syntax.dockerfiles:
	python util/check_dockerfile_coverage.py "$(images)"
	
23 24
test.edx_east_roles:
	tests/test_edx_east_roles.sh
25 26 27 28 29

clean: test.clean

test.clean:
	rm -rf playbooks/edx-east/test_output