~ibmcharmers/charms/trusty/ibm-platform-pm/trunk

« back to all changes in this revision

Viewing changes to Makefile

  • Committer: Rajith Venkata
  • Date: 2016-10-21 11:22:07 UTC
  • Revision ID: rajith.pv@in.ibm.com-20161021112207-ckb3yf869aeab3va
Intial checkin for layered built charm of ibm-platform-pm

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/make
 
2
 
 
3
all: lint unit_test
 
4
 
 
5
 
 
6
.PHONY: clean
 
7
clean:
 
8
        @rm -rf .tox
 
9
 
 
10
.PHONY: apt_prereqs
 
11
apt_prereqs:
 
12
        @# Need tox, but don't install the apt version unless we have to (don't want to conflict with pip)
 
13
        @which tox >/dev/null || (sudo apt-get install -y python-pip && sudo pip install tox)
 
14
 
 
15
.PHONY: lint
 
16
lint: apt_prereqs
 
17
        @tox --notest
 
18
        @PATH=.tox/py34/bin:.tox/py35/bin flake8 $(wildcard hooks reactive lib unit_tests tests)
 
19
        @charm proof
 
20
 
 
21
.PHONY: unit_test
 
22
unit_test: apt_prereqs
 
23
        @echo Starting tests...
 
24
        tox