Merge lp:~frankban/charms/trusty/redis/tsting-fixes into lp:~juju-gui/charms/trusty/redis/trunk
Proposed by
Francesco Banconi
Status: | Merged |
---|---|
Merged at revision: | 5 |
Proposed branch: | lp:~frankban/charms/trusty/redis/tsting-fixes |
Merge into: | lp:~juju-gui/charms/trusty/redis/trunk |
Diff against target: |
96 lines (+20/-14) 1 file modified
Makefile (+20/-14) |
To merge this branch: | bzr merge lp:~frankban/charms/trusty/redis/tsting-fixes |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Brad Crittenden (community) | code | Approve | |
Review via email: mp+262062@code.launchpad.net |
Description of the change
Makefile fixes for bundletester.
- The "local" env is no longer used by default when
JUJU_ENV is not specified. Now the current env is
used instead.
- The environment is no longer destroyed when ftests
complete.
- Do not exit if bootstrap returns an error: assume
the environment to be already bootstrapped.
- Removed the setup phony target to work around a
bundletester bug.
For more info, see review comments at
https:/
To post a comment you must log in.
Reviewers: mp+262062_ code.launchpad. net,
Message:
Please take a look.
Description:
Makefile fixes for bundletester.
- The "local" env is no longer used by default when
JUJU_ENV is not specified. Now the current env is
used instead.
- The environment is no longer destroyed when ftests
complete.
- Do not exit if bootstrap returns an error: assume
the environment to be already bootstrapped.
- Removed the setup phony target to work around a
bundletester bug.
For more info, see review comments at /bugs.launchpad .net/charms/ +bug/1459345
https:/
https:/ /code.launchpad .net/~frankban/ charms/ trusty/ redis/tsting- fixes/+ merge/262062
(do not edit description out of merge proposal)
Please review this at https:/ /codereview. appspot. com/248930043/
Affected files (+19, -13 lines):
M Makefile
A [revision details]
Index: Makefile
=== modified file 'Makefile'
--- Makefile 2015-06-05 09:15:51 +0000
+++ Makefile 2015-06-16 09:51:39 +0000
@@ -7,7 +7,6 @@
# Override those values to run functional tests with a different
environment
# or Juju series.
SERIES=trusty
-JUJU_ENV=local
# Define system Debian dependencies: run "make sysdeps" to install them.
# Please keep them in alphabetical order.
@@ -21,7 +20,7 @@
PIP = $(VENV)/bin/pip
FTESTS=$(shell find -L tests -type f -executable | sort)
-.DEFAULT_GOAL := setup
+.DEFAULT_GOAL := $(VENV_ACTIVATE)
.PHONY: help NAME=myredis'
help:
@@ -38,9 +37,10 @@
@echo 'with the SERIES environment variable and the service name with '
@echo 'the JUJU_SERVICE_NAME environment variable, for instance:'
@echo ' make deploy SERIES=precise JUJU_SERVICE_
-
-.PHONY: setup
-setup: $(VENV_ACTIVATE)
+ @echo -e '\nWhen using "make deploy" or "make test" or "make ftest" it '
+ @echo 'is possible to override the Juju environement that will be used '
+ @echo 'with the JUJU_ENV environment variable, for instance:'
+ @echo ' make test JUJU_ENV=ec2'
.PHONY: sysdeps
sysdeps:
@@ -53,7 +53,7 @@
@touch $(VENV_ACTIVATE)
.PHONY: bundletester /bin/bundletest er -l DEBUG
-bundletester: setup
+bundletester: $(VENV_ACTIVATE)
$(PIP) install bundletester
$(VENV)
@@ -67,13 +67,14 @@
juju charm proof
.PHONY: lint /bin/flake8 --show-source --exclude=$(VENV) \ generic- hook \
-lint: setup
+lint: $(VENV_ACTIVATE)
@$(VENV)
--filename *.py,install,
hooks/ tests/ unit_tests/
.PHONY: deploy $(JUJU_ ENV) juju switch)) :=$(shell mktemp -d `readlink -f REPOSITORY) /${SERIES} /$(JUJU_ TEST_CHARM) \ {SERIES} /$(JUJU_ TEST_CHARM) $(JUJU_ SERVICE_ NAME) {SERIES} /$(JUJU_ TEST_CHARM) SERVICE_ NAME)
deploy:
+ $(eval JENV := $(shell JUJU_ENV=
@# The use of readlink below is required for OS X.
@$(eval export JUJU_REPOSITORY
/tmp`/temp.XXXX))
@echo "JUJU_REPOSITORY is $(JUJU_REPOSITORY)"
@@ -82,24 +83,27 @@
@rsync -a . $(JUJU_
--exclude .git --exclude .bzr --exclude tests --exclude unit_tests
@# Deploying the charm.
- juju deploy local:$
+ juju deploy -e $(JENV) local:$
$(JUJU_
.PHONY: test
test: unittest ftest
.PHONY: ftest $(JUJU_ ENV) juju switch))
-ftest: setup
- juju bootstrap -e $(JUJU_ENV) --upload-tools
+ftest: $(VENV_ACTIVATE)
+ $(eval JENV := $(shell JUJU_ENV=
+ @j...