Merge ~barryprice/charm-canonical-livepatch/+git/canonical-livepatch-charm:charm-test into ~livepatch-charmers/charm-canonical-livepatch:master

Proposed by Barry Price
Status: Merged
Approved by: Tom Haddon
Approved revision: 0de9b500842cae5ea55a0ffb3fbfac8384374034
Merged at revision: 7cef6428f24a5d1a2c7c7b7098147a883b0b0bc7
Proposed branch: ~barryprice/charm-canonical-livepatch/+git/canonical-livepatch-charm:charm-test
Merge into: ~livepatch-charmers/charm-canonical-livepatch:master
Prerequisite: ~barryprice/charm-canonical-livepatch/+git/canonical-livepatch-charm:master
Diff against target: 62 lines (+38/-5)
3 files modified
Makefile (+36/-2)
dev/null (+0/-3)
tests/tests.yaml (+2/-0)
Reviewer Review Type Date Requested Status
Tom Haddon Approve
Review via email: mp+345071@code.launchpad.net

Commit message

Adding charm-test compatibility.

This relies on the acceptance of https://code.launchpad.net/~barryprice/charm-test/+git/charm-test/+merge/345063

To post a comment you must log in.
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

This merge proposal is being monitored by mergebot. Change the status to Approved to merge.

Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

Unable to determine commit message from repository - please click "Set commit message" and enter the commit message manually.

Revision history for this message
Tom Haddon (mthaddon) wrote :

LGTM

review: Approve
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

Change successfully merged at revision 7cef6428f24a5d1a2c7c7b7098147a883b0b0bc7

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/Makefile b/Makefile
2index 07b57c9..630e665 100644
3--- a/Makefile
4+++ b/Makefile
5@@ -1,4 +1,38 @@
6-#!/usr/bin/make
7+BUILDDEST:=$(if $(JUJU_REPOSITORY),$(JUJU_REPOSITORY),"../canonical-livepatch-built")
8+BUILTCHARMDIR:="$(BUILDDEST)/builds/canonical-livepatch"
9
10+all: test
11+
12+.PHONY: clean
13+clean:
14+ @rm -f .unit-state.db
15+ @find . -name "*.pyc" -type f -exec rm -f '{}' \;
16+ @find . -name "__pycache__" -type d -prune -exec rm -rf '{}' \;
17+
18+.PHONY: testdeps
19+testdeps:
20+ @sudo apt-get update
21+ @sudo apt-get install -y make flake8 python3-flake8 python3-pip python-pip snapd
22+ @which juju >/dev/null || (sudo snap install juju --classic)
23+ @which charm >/dev/null || (sudo snap install charm)
24+ @which bundletester >/dev/null || (pip2 install bundletester juju-deployer)
25+ @pip3 install amulet
26+
27+.PHONY: lint
28 lint:
29- @flake8 --max-line-length=120
30+ @flake8 --max-complexity=16 --max-line-length=120 && echo OK
31+
32+.PHONY: charmbuild
33+charmbuild:
34+ charm build --output-dir $(BUILDDEST) --report
35+
36+.PHONY: test
37+test: check-jujumodel
38+ @echo "Running functional tests (including lint and unit tests)..."
39+ bundletester -t $(BUILTCHARMDIR) -Fvl DEBUG -e $(JUJU_MODEL)
40+
41+.PHONY: check-jujumodel
42+check-jujumodel:
43+ifndef JUJU_MODEL
44+ $(error JUJU_MODEL is undefined)
45+endif
46diff --git a/tests/00-setup b/tests/00-setup
47deleted file mode 100755
48index 830e9a6..0000000
49--- a/tests/00-setup
50+++ /dev/null
51@@ -1,3 +0,0 @@
52-#!/bin/bash
53-
54-pip3 install amulet juju-deployer
55diff --git a/tests/tests.yaml b/tests/tests.yaml
56new file mode 100644
57index 0000000..757bcc2
58--- /dev/null
59+++ b/tests/tests.yaml
60@@ -0,0 +1,2 @@
61+makefile:
62+ - lint

Subscribers

People subscribed via source and target branches