summaryrefslogtreecommitdiff
path: root/Makefile
blob: c23418bd1b329634f64c73ba501bfc77d0aefb86 (plain)
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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 
# This file is part of the mongodb charm. # Copyright (C) 2013 Canonical Ltd. # # This program is free software: you can redistribute it and/or modify it under # the terms of the GNU Affero General Public License version 3, as published by # the Free Software Foundation. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranties of MERCHANTABILITY, # SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. PYTHON := /usr/bin/env python ACTIONS := $(shell grep -slE '\#!(.*)python' actions/*) clean:	rm -f .coverage	find . -name '*.pyc' -delete	rm -rf .venv	(which dh_clean && dh_clean) || true .venv:	sudo apt-get install -y gcc python-dev python-virtualenv python-apt	virtualenv .venv --system-site-packages	.venv/bin/pip install -I -r test_requirements.txt lint: .venv	.venv/bin/flake8 --exclude hooks/charmhelpers actions $(ACTIONS) hooks tests unit_tests	.venv/bin/charm-proof test: .venv	@echo Starting unit tests...	.venv/bin/nosetests -s --nologcapture --with-coverage $(EXTRA) unit_tests/	.venv/bin/nosetests -s --nologcapture --with-coverage $(EXTRA) actions/ functional_test:	@echo Starting amulet tests...	@juju test -v -p AMULET_HTTP_PROXY --timeout 900 sync:	@mkdir -p bin	@bzr cat lp:charm-helpers/tools/charm_helpers_sync/charm_helpers_sync.py > bin/charm_helpers_sync.py	@$(PYTHON) bin/charm_helpers_sync.py -c charm-helpers-sync.yaml publish: lint unit_test	bzr push lp:charms/mongodb	bzr push lp:charms/trusty/mongodb