Merge lp:~townsend/libertine/smoke-test-workaround into lp:libertine
- smoke-test-workaround
- Merge into devel
Status: | Merged |
---|---|
Approved by: | Christopher Townsend |
Approved revision: | 300 |
Merged at revision: | 298 |
Proposed branch: | lp:~townsend/libertine/smoke-test-workaround |
Merge into: | lp:libertine |
Diff against target: |
62 lines (+33/-6) 1 file modified
python/libertine/LxcContainer.py (+33/-6) |
To merge this branch: | bzr merge lp:~townsend/libertine/smoke-test-workaround |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Libertine CI Bot | continuous-integration | Approve | |
Larry Price | Approve | ||
Review via email: mp+304665@code.launchpad.net |
Commit message
Add check for special LIBERTINE_
Description of the change
Libertine CI Bot (libertine-ci-bot) wrote : | # |
Libertine CI Bot (libertine-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:297
https:/
Executed test runs:
FAILURE: https:/
None: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
Larry Price (larryprice) wrote : | # |
Can we somehow take advantage of lxc config variables while setting up the tests?
https:/
I'm thinking particularly core.http and core.https. I don't know if they apply globally or only to container download.
...I'm also not really sure what the smoke test build is doing? You'll have to enlighten me in the morning.
Larry Price (larryprice) wrote : | # |
Ah - I found that it's all based out of the lp:libertine-testing branch. Not sure how it's all getting installed on slave-0 and running, though.
I also think my previous comment is actually only a config option for LXD. Another option might be the MIRROR env variable, which I think we might be able to set globally before the smoke test run based on this link: https:/
Larry Price (larryprice) wrote : | # |
Well - I might have misinterpreted their MIRROR command. We can probably just touch base and approve this in the morning.
Libertine CI Bot (libertine-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:298
https:/
Executed test runs:
FAILURE: https:/
None: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
Libertine CI Bot (libertine-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:298
https:/
Executed test runs:
FAILURE: https:/
None: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
Libertine CI Bot (libertine-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:299
https:/
Executed test runs:
FAILURE: https:/
None: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
Libertine CI Bot (libertine-ci-bot) wrote : | # |
FAILED: Autolanding.
More details in the following jenkins job:
https:/
Executed test runs:
FAILURE: https:/
None: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
- 300. By Christopher Townsend
-
Merge lp:libertine.
Libertine CI Bot (libertine-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:300
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
None: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Preview Diff
1 | === modified file 'python/libertine/LxcContainer.py' |
2 | --- python/libertine/LxcContainer.py 2016-09-06 12:36:47 +0000 |
3 | +++ python/libertine/LxcContainer.py 2016-09-07 19:08:46 +0000 |
4 | @@ -12,6 +12,7 @@ |
5 | # You should have received a copy of the GNU General Public License along |
6 | # with this program. If not, see <http://www.gnu.org/licenses/>. |
7 | |
8 | +import contextlib |
9 | import crypt |
10 | import dbus |
11 | import lxc |
12 | @@ -72,6 +73,31 @@ |
13 | return host_timezone |
14 | |
15 | |
16 | +class EnvLxcSettings(contextlib.ExitStack): |
17 | + """ |
18 | + Helper object providing a way to set the proxies for testing |
19 | + |
20 | + When running smoke tests on Jenkins, LXC create operations need the proxies |
21 | + set, but subsequent apt operations cannot have the proxies set. This will |
22 | + set the proxies when called and unset the proxies when the context is |
23 | + destroyed. |
24 | + """ |
25 | + def __init__(self): |
26 | + super().__init__() |
27 | + self.set_proxy_env() |
28 | + self.callback(lambda: self.del_proxy_env()) |
29 | + |
30 | + def set_proxy_env(self): |
31 | + if 'LIBERTINE_JENKAAS_TESTING' in os.environ: |
32 | + os.environ['http_proxy'] = 'http://squid.internal:3128' |
33 | + os.environ['https_proxy'] = 'https://squid.internal:3128' |
34 | + |
35 | + def del_proxy_env(self): |
36 | + if 'LIBERTINE_JENKAAS_TESTING' in os.environ: |
37 | + del os.environ['http_proxy'] |
38 | + del os.environ['https_proxy'] |
39 | + |
40 | + |
41 | class LibertineLXC(BaseContainer): |
42 | """ |
43 | A concrete container type implemented using an LXC container. |
44 | @@ -181,12 +207,13 @@ |
45 | |
46 | utils.create_libertine_user_data_dir(self.container_id) |
47 | |
48 | - if not self.container.create("download", 0, |
49 | - {"dist": "ubuntu", |
50 | - "release": self.installed_release, |
51 | - "arch": self.architecture}): |
52 | - print("Failed to create container") |
53 | - return False |
54 | + with EnvLxcSettings(): |
55 | + if not self.container.create("download", 0, |
56 | + {"dist": "ubuntu", |
57 | + "release": self.installed_release, |
58 | + "arch": self.architecture}): |
59 | + print("Failed to create container") |
60 | + return False |
61 | |
62 | self.create_libertine_config() |
63 |
FAILED: Continuous integration, rev:297 /jenkins. canonical. com/libertine/ job/lp- libertine- ci/111/ /jenkins. canonical. com/libertine/ job/build/ 319/console /jenkins. canonical. com/libertine/ job/lp- generic- update- mp/240/ console /jenkins. canonical. com/libertine/ job/build- 0-fetch/ 321 /jenkins. canonical. com/libertine/ job/build- 1-sourcepkg/ release= vivid+overlay/ 305 /jenkins. canonical. com/libertine/ job/build- 1-sourcepkg/ release= xenial+ overlay/ 305 /jenkins. canonical. com/libertine/ job/build- 1-sourcepkg/ release= yakkety/ 305 /jenkins. canonical. com/libertine/ job/build- 2-binpkg/ arch=amd64, release= vivid+overlay/ 299 /jenkins. canonical. com/libertine/ job/build- 2-binpkg/ arch=amd64, release= vivid+overlay/ 299/artifact/ output/ *zip*/output. zip /jenkins. canonical. com/libertine/ job/build- 2-binpkg/ arch=amd64, release= xenial+ overlay/ 299 /jenkins. canonical. com/libertine/ job/build- 2-binpkg/ arch=amd64, release= xenial+ overlay/ 299/artifact/ output/ *zip*/output. zip /jenkins. canonical. com/libertine/ job/build- 2-binpkg/ arch=amd64, release= yakkety/ 299/console /jenkins. canonical. com/libertine/ job/build- 2-binpkg/ arch=i386, release= vivid+overlay/ 299 /jenkins. canonical. com/libertine/ job/build- 2-binpkg/ arch=i386, release= vivid+overlay/ 299/artifact/ output/ *zip*/output. zip /jenkins. canonical. com/libertine/ job/build- 2-binpkg/ arch=i386, release= xenial+ overlay/ 299 /jenkins. canonical. com/libertine/ job/build- 2-binpkg/ arch=i386, release= xenial+ overlay/ 299/artifact/ output/ *zip*/output. zip /jenkins. canonical. com/libertine/ job/build- 2-binpkg/ arch=i386, release= yakkety/ 299/console
https:/
Executed test runs:
FAILURE: https:/
None: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
Click here to trigger a rebuild: /jenkins. canonical. com/libertine/ job/lp- libertine- ci/111/ rebuild
https:/