forked from juju-solutions/layer-apache-bigtop-base
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
30 lines (24 loc) · 740 Bytes
/
Makefile
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
27
28
29
30
#!/usr/bin/make
all: lint unit_test
.PHONY: clean
clean:
@rm -rf .cache
@rm -f .coverage
@rm -rf .tox
@find . -name "*.pyc" -type f -exec rm -f '{}' \;
@find . -name "__pycache__" -type d -prune -exec rm -rf '{}' \;
.PHONY: sysdeps
sysdeps:
@which charm >/dev/null || (sudo apt-get install -y snapd && sudo snap install charm --candidate)
@which tox >/dev/null || (sudo apt-get install -y python-pip && sudo pip install tox)
.PHONY: lint
lint: sysdeps
@echo Starting linter...
@tox -c tox_unit.ini --notest
@PATH=.tox/py34/bin:.tox/py35/bin flake8 $(wildcard hooks reactive lib unit_tests tests)
@echo Starting proof...
@charm proof
.PHONY: unit_test
unit_test: sysdeps
@echo Starting unit tests...
@tox -c tox_unit.ini