Merge branch 'branchfrom--juju-charms'
[osm/devops.git] / juju-charms / layers / vyos-proxy / Makefile
diff --git a/juju-charms/layers/vyos-proxy/Makefile b/juju-charms/layers/vyos-proxy/Makefile
new file mode 100644 (file)
index 0000000..a1ad3a5
--- /dev/null
@@ -0,0 +1,24 @@
+#!/usr/bin/make
+
+all: lint unit_test
+
+
+.PHONY: clean
+clean:
+       @rm -rf .tox
+
+.PHONY: apt_prereqs
+apt_prereqs:
+       @# Need tox, but don't install the apt version unless we have to (don't want to conflict with pip)
+       @which tox >/dev/null || (sudo apt-get install -y python-pip && sudo pip install tox)
+
+.PHONY: lint
+lint: apt_prereqs
+       @tox --notest
+       @PATH=.tox/py34/bin:.tox/py35/bin flake8 $(wildcard hooks reactive lib unit_tests tests)
+       @charm proof
+
+.PHONY: unit_test
+unit_test: apt_prereqs
+       @echo Starting tests...
+       tox