launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #11663
[Merge] lp:~allenap/maas/acceptance into lp:maas
Gavin Panella has proposed merging lp:~allenap/maas/acceptance into lp:maas.
Requested reviews:
MAAS Maintainers (maas-maintainers)
For more details, see:
https://code.launchpad.net/~allenap/maas/acceptance/+merge/123078
--
https://code.launchpad.net/~allenap/maas/acceptance/+merge/123078
Your team MAAS Maintainers is requested to review the proposed merge of lp:~allenap/maas/acceptance into lp:maas.
=== modified file '.bzrignore'
--- .bzrignore 2012-07-28 07:44:58 +0000
+++ .bzrignore 2012-09-06 13:37:27 +0000
@@ -4,6 +4,10 @@
./.coverage
./.installed.cfg
./.noseids
+./acceptance/*.build
+./acceptance/*.changes
+./acceptance/*.deb
+./acceptance/source
./bin
./build
./celerybeat-schedule
@@ -13,7 +17,6 @@
./docs/_autosummary
./docs/_build
./docs/api.rst
-dropin.cache
./eggs
./include
./lib
@@ -27,3 +30,4 @@
./src/maasserver/static/js/enums.js
./TAGS
./tags
+dropin.cache
=== added directory 'acceptance'
=== added file 'acceptance/Makefile'
--- acceptance/Makefile 1970-01-01 00:00:00 +0000
+++ acceptance/Makefile 2012-09-06 13:37:27 +0000
@@ -0,0 +1,61 @@
+include /etc/lsb-release
+
+packaging := lp:~maas-maintainers/maas/packaging.$(DISTRIB_CODENAME)
+
+# Special-case Quantal.
+ifeq ($(DISTRIB_CODENAME),quantal)
+packaging := lp:~maas-maintainers/maas/packaging
+endif
+
+upstream := $(abspath ..)
+packages = $(abspath $(wildcard *.deb))
+image := maas-$(DISTRIB_CODENAME)
+
+##
+
+test: sudo build image
+ sudo LC_ALL=C SSH_ASKPASS=$(abspath ubuntupass) setsid \
+ lxc-start-ephemeral -b $(abspath .) -o $(image) -u ubuntu -- \
+ SUDO_ASKPASS=$(abspath ubuntupass) $(abspath test) $(packages)
+
+build: source source/debian
+ cd source && debuild -i -us -uc -b
+
+image:
+ifeq ($(filter $(image),$(shell lxc-ls)),)
+ sudo lxc-create -n $(image) -t ubuntu
+endif
+
+##
+
+source:
+ bzr export --uncommitted $@ $(upstream)
+
+source/debian: | source
+ bzr export $@ $(packaging)/debian
+
+##
+
+sudo:
+ @sudo -v
+
+install-missing-packages:
+ sudo apt-get install dh-apport
+
+clean:
+ $(RM) -r source *.build *.changes *.deb
+
+##
+
+define phony
+ build
+ clean
+ image
+ install-missing-packages
+ sudo
+ test
+endef
+
+phony := $(sort $(strip $(phony)))
+
+.PHONY: $(phony)
=== added file 'acceptance/README'
--- acceptance/README 1970-01-01 00:00:00 +0000
+++ acceptance/README 2012-09-06 13:37:27 +0000
@@ -0,0 +1,13 @@
+MAAS Packaging Acceptance Testing
+---------------------------------
+
+The `test` make target will build binary packages for the current
+branch using the latest packaging branch from Launchpad, and then run
+the "test" script (from the current directory) in an ephemeral LXC
+container.
+
+Consider the "test" script, as it stands, as a bootstrap point for
+further testing. It may not be suitable for full automated end-to-end
+testing of MAAS, so be clear about what you need to test before
+investing work here. OTOH, it is a good place to test that the
+packages install and configure themselves as expected.
=== added file 'acceptance/test'
--- acceptance/test 1970-01-01 00:00:00 +0000
+++ acceptance/test 2012-09-06 13:37:27 +0000
@@ -0,0 +1,3 @@
+#!/usr/bin/env bash
+sudo -A dpkg --install -- "$@"
+sudo -A apt-get --fix-broken --assume-yes install
=== added file 'acceptance/ubuntupass'
--- acceptance/ubuntupass 1970-01-01 00:00:00 +0000
+++ acceptance/ubuntupass 2012-09-06 13:37:27 +0000
@@ -0,0 +1,2 @@
+#!/usr/bin/env bash
+echo ubuntu
Follow ups