launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #10406
[Merge] lp:~bac/lpsetup/stub-lp into lp:lpsetup
Brad Crittenden has proposed merging lp:~bac/lpsetup/stub-lp into lp:lpsetup.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~bac/lpsetup/stub-lp/+merge/117319
This branch makes the lpsetup test_install_lxc.py integration test check out and use a fake Launchpad branch, so that the test can run faster.
A recent run completed in 22 minutes on my development machine.
The branch it checks out is at lp:~yellow/launchpad/stub. It only has the referenced three scripts in utilities and the minimal targets required for the Makefile. Gary suggested that the utility scripts actually touch a file to demonstrate they did something but I didn't see that doing so would be too helpful. We can add that in if it ever becomes useful.
--
https://code.launchpad.net/~bac/lpsetup/stub-lp/+merge/117319
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~bac/lpsetup/stub-lp into lp:lpsetup.
=== modified file 'README.rst'
--- README.rst 2012-07-25 18:26:32 +0000
+++ README.rst 2012-07-30 18:42:31 +0000
@@ -116,7 +116,7 @@
For the testing scenario, the host machine must be manually changed
once[1] with the following modifications:
-sudo cp lpsetup/templates/lxc-with-testing /etc/apparmor.d/lxc
+sudo cp lpsetup/templates/lxc-container-with-nesting /etc/apparmor.d/lxc
sudo /etc/init.d/apparmor reload
sudo cp /usr/lib/lxc/templates/lxc-ubuntu /usr/lib/lxc/templates/lxc-ubuntu.orig
sudo sed -i "s/#lxc.aa_profile = unconfined/lxc.aa_profile = lxc-container-with-nesting/" \
@@ -177,3 +177,4 @@
cd lplxcip
sudo nosetests
+
=== added directory 'bin'
=== added file 'bin/setup-host-for-nested-lxc-containers.sh'
--- bin/setup-host-for-nested-lxc-containers.sh 1970-01-01 00:00:00 +0000
+++ bin/setup-host-for-nested-lxc-containers.sh 2012-07-30 18:42:31 +0000
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+sudo cp lpsetup/templates/lxc-container-with-nesting /etc/apparmor.d/lxc
+sudo /etc/init.d/apparmor reload
+sudo cp /usr/lib/lxc/templates/lxc-ubuntu /usr/lib/lxc/templates/lxc-ubuntu.orig
+sudo sed -i "s/#lxc.aa_profile = unconfined/lxc.aa_profile = lxc-container-with-nesting/" \
+ /usr/lib/lxc/templates/lxc-ubuntu
=== renamed file 'lpsetup/templates/lxc-with-testing' => 'lpsetup/templates/lxc-container-with-nesting'
=== modified file 'lpsetup/tests/integration/test_install_lxc.py'
--- lpsetup/tests/integration/test_install_lxc.py 2012-07-25 17:44:02 +0000
+++ lpsetup/tests/integration/test_install_lxc.py 2012-07-30 18:42:31 +0000
@@ -33,7 +33,12 @@
def get_push_location(self, branch=None):
if branch is None:
branch = self.get_branch()
- return branch.get_push_location()
+ push = branch.get_push_location()
+ if push.startswith('lp:'):
+ # Convert to bzr+ssh or the calls to WorkingTree fail,
+ # inexplicably.
+ push = push.replace('lp:', 'bzr+ssh://bazaar.launchpad.net/')
+ return push
def check_environment(self):
"""Be sure the test environment doesn't exist."""
@@ -48,10 +53,9 @@
# bzr+ssh URLs work.
self.branch = self.get_branch()
self.push_location = self.get_push_location(self.branch)
- if self.push_location.startswith('lp:'):
- raise RuntimeError(
- "Push location must use http or bzr+ssh "
- "protocol: {}".format(self.push_location))
+ if self.push_location is None:
+ raise RuntimeError("Push location must be set.")
+
# Ensure the branch has been pushed and has no missing revisions.
try:
push_branch = self.get_branch(self.push_location)
@@ -88,8 +92,11 @@
urlparts = list(urlparse.urlsplit(self.push_location))
urlparts[0] = 'http'
branch_location = urlparse.urlunsplit(urlparts)
- cmd = 'lpsetup/lp-setup install-lxc --use-http -B {} -r {}'.format(
- branch_location, self.repo)
+ lp_source = 'http://bazaar.launchpad.net/~yellow/launchpad/stub'
+ cmd = (
+ 'lpsetup/lp-setup install-lxc --use-http '
+ '--source {} -B {} -r {}'.format(
+ lp_source, branch_location, self.repo))
self.on_remote(cmd)