~le-charmers/charms/trusty/rabbitmq-server/leadership-election

45.2.65 by yolanda.robla at canonical
refreshed charmhelpers
1
#!/usr/bin/make
2
PYTHON := /usr/bin/env python
60.1.1 by David Britton
- make use of new compare_versions logic in charm helpers (fixing lp:1375084)
3
CHARM_DIR := $(PWD)
4
HOOKS_DIR := $(PWD)/hooks
5
TEST_PREFIX := PYTHONPATH=$(HOOKS_DIR)
45.2.65 by yolanda.robla at canonical
refreshed charmhelpers
6
75.1.6 by Felipe Reyes
Create virtualenv to run unit tests
7
clean:
8
	rm -f .coverage
9
	find . -name '*.pyc' -delete
10
	rm -rf .venv
11
	(which dh_clean && dh_clean) || true
12
13
.venv:
14
	sudo apt-get install -y gcc python-dev python-virtualenv python-apt
15
	virtualenv .venv --system-site-packages
16
	.venv/bin/pip install -I -r test-requirements.txt
17
52.5.23 by james.page at ubuntu
Run flake8 from venv as well
18
lint: .venv
83.6.6 by Billy Olsen
Fix remaining amulet issues, lint, and http proxy settings for the
19
	@.venv/bin/flake8 --exclude hooks/charmhelpers,tests/charmhelpers hooks \
20
        unit_tests tests
45.2.65 by yolanda.robla at canonical
refreshed charmhelpers
21
	@charm proof
22
52.5.6 by james.page at ubuntu
Add more helpers to Makefile
23
bin/charm_helpers_sync.py:
24
	@mkdir -p bin
25
	@bzr cat lp:charm-helpers/tools/charm_helpers_sync/charm_helpers_sync.py \
26
        > bin/charm_helpers_sync.py
27
28
sync: bin/charm_helpers_sync.py
29
	@$(PYTHON) bin/charm_helpers_sync.py -c charm-helpers.yaml
83.6.2 by Billy Olsen
[wolsen,r=]
30
	@$(PYTHON) bin/charm_helpers_sync.py -c charm-helpers-tests.yaml
52.5.6 by james.page at ubuntu
Add more helpers to Makefile
31
32
publish: lint
33
	bzr push lp:charms/rabbitmq-server
34
	bzr push lp:charms/trusty/rabbitmq-server
60.1.1 by David Britton
- make use of new compare_versions logic in charm helpers (fixing lp:1375084)
35
52.5.23 by james.page at ubuntu
Run flake8 from venv as well
36
unit_test: .venv
60.1.1 by David Britton
- make use of new compare_versions logic in charm helpers (fixing lp:1375084)
37
	@echo Starting tests...
75.1.6 by Felipe Reyes
Create virtualenv to run unit tests
38
	env CHARM_DIR=$(CHARM_DIR) $(TEST_PREFIX) .venv/bin/nosetests unit_tests/
60.1.1 by David Britton
- make use of new compare_versions logic in charm helpers (fixing lp:1375084)
39
75.1.3 by Felipe Reyes
Add amulet test
40
functional_test:
41
	@echo Starting amulet tests...
83.9.2 by David Ames
Fix Billy Olsen's suggestions
42
	@juju test -v -p AMULET_HTTP_PROXY,OS_USERNAME,OS_TENANT_NAME,OS_REGION_NAME,OS_PASSWORD,OS_AUTH_URL --timeout 900