Merge lp:~aaron-whitehouse/duplicity/launchpad_tox_profile into lp:~duplicity-team/duplicity/0.7-series

Proposed by Aaron Whitehouse
Status: Merged
Merged at revision: 1121
Proposed branch: lp:~aaron-whitehouse/duplicity/launchpad_tox_profile
Merge into: lp:~duplicity-team/duplicity/0.7-series
Diff against target: 52 lines (+16/-6)
3 files modified
README-REPO (+7/-4)
po/duplicity.pot (+1/-1)
tox.ini (+8/-1)
To merge this branch: bzr merge lp:~aaron-whitehouse/duplicity/launchpad_tox_profile
Reviewer Review Type Date Requested Status
duplicity-team Pending
Review via email: mp+266859@code.launchpad.net

Commit message

Add tox testing profile that mimics the packages installed on the Launchpad build server, to reduce the likelihood of tests passing our test suite, but failing on the build server (e.g. because of the out-of-date mock version).

Description of the change

Add tox testing profile that mimics the packages installed on the Launchpad build server, to reduce the likelihood of tests passing our test suite, but failing on the build server (e.g. because of the out-of-date mock version).

To post a comment you must log in.
Revision history for this message
Aaron Whitehouse (aaron-whitehouse) wrote :

Note that this change does introduce another test run. On my machine, each run takes about 5 minutes, so run-tests has increased from taking 10 minutes to 15 minutes. It does, however, make it very clear if any test failures result from Python 2.6, 2.7 or the particular set-up on the build server.

To me, this is probably the best approach. 15 minutes does not seem ridiculous for a final pre-commit test before proposing a merge. If a developer is doing a lot of testing to isolate and fix a bug, they can use the tox commands set out in the README-REPO to test a narrower range of tests, or to only test against one or two test environments (py26, py27 or lpbuildd).

If you disagree, however, and think that we need to limit the testing to two runs, there are two obvious options to me:
1) Change the command in testing/run-tests to be "tox -e py26,py27", so that everything is as it was before and the new lpbuildd profile is only used if "tox" or "tox -e lpbuildd" is run (likely by one of us looking for a build issue).
2) Change the command in testing/run-tests to be "tox -e py26,lpbuildd". The Launchpad build server runs Python 2.7 anyway, so testing against Python 2.6 and the Launchpad build server profile should find any issues with either Python version. The key downside to this approach is that if there are any issues, such as the recent issue with Launchpad's mock.patch not taking a return_value argument, it would be harder to determine whether the issue was caused by the Python version or the obsolete build server package versions.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'README-REPO'
2--- README-REPO 2015-08-01 12:05:34 +0000
3+++ README-REPO 2015-08-04 11:27:37 +0000
4@@ -69,10 +69,13 @@
5
6 Duplicity currently supports Python versions v2.6 or later. Duplicity uses tox
7 to make it easy to test your code against multiple Python versions. Running
8-tests using the commands above will automatically test code against
9-both Python v2.6 and v2.7, if you have both installed on your system.
10+tests using the commands above will automatically test code against both
11+Python v2.6 and v2.7, if you have both installed on your system. It will also
12+test against the versions of dependencies used by the Launchpad build system.
13+You can test against a single environment, e.g.
14+tox -e py26
15+for example if you are working on fixing a bug, but please do a full run-tests
16+before submitting a merge request.
17
18 For instructions on installing Python v2.6 on newer versions of Ubuntu, see
19 https://launchpad.net/~fkrull/+archive/ubuntu/deadsnakes
20-
21-
22
23=== modified file 'po/duplicity.pot'
24--- po/duplicity.pot 2015-08-03 12:25:22 +0000
25+++ po/duplicity.pot 2015-08-04 11:27:37 +0000
26@@ -8,7 +8,7 @@
27 msgstr ""
28 "Project-Id-Version: PACKAGE VERSION\n"
29 "Report-Msgid-Bugs-To: Kenneth Loafman <kenneth@loafman.com>\n"
30-"POT-Creation-Date: 2015-08-02 06:35-0500\n"
31+"POT-Creation-Date: 2015-08-04 11:30+0100\n"
32 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
33 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
34 "Language-Team: LANGUAGE <LL@li.org>\n"
35
36=== modified file 'tox.ini'
37--- tox.ini 2015-07-31 14:49:46 +0000
38+++ tox.ini 2015-08-04 11:27:37 +0000
39@@ -1,5 +1,12 @@
40 [tox]
41-envlist=py26,py27
42+envlist=py26,py27,lpbuildd
43+
44+[testenv:lpbuildd]
45+deps=
46+ lockfile==0.8
47+ mock==0.7.2
48+ pexpect==2.4
49+ python==2.7
50
51 [testenv]
52 setenv=

Subscribers

People subscribed via source and target branches