Merge lp:~jelmer/brz/no-tests into lp:brz

Proposed by Jelmer Vernooij
Status: Merged
Approved by: Jelmer Vernooij
Approved revision: no longer in the source branch.
Merge reported by: The Breezy Bot
Merged at revision: not available
Proposed branch: lp:~jelmer/brz/no-tests
Merge into: lp:brz
Diff against target: 67 lines (+11/-7)
2 files modified
breezy/builtins.py (+5/-1)
setup.py (+6/-6)
To merge this branch: bzr merge lp:~jelmer/brz/no-tests
Reviewer Review Type Date Requested Status
Martin Packman Approve
Review via email: mp+342440@code.launchpad.net

Commit message

Allow breezy's selftest to run without tests installed.

Description of the change

Allow breezy's selftest to run without tests installed.

Debian has been shipping a similar patch for many years.

To post a comment you must log in.
Revision history for this message
Martin Packman (gz) wrote :

Thanks.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'breezy/builtins.py'
2--- breezy/builtins.py 2018-03-25 00:39:16 +0000
3+++ breezy/builtins.py 2018-03-30 04:14:06 +0000
4@@ -4200,7 +4200,11 @@
5 # disallowing it currently leads to failures in many places.
6 lazy_import.disallow_proxying()
7
8- from . import tests
9+ try:
10+ from . import tests
11+ except ImportError:
12+ raise errors.BzrCommandError("tests not available. Install the "
13+ "breezy tests to run the breezy testsuite.")
14
15 if testspecs_list is not None:
16 pattern = '|'.join(testspecs_list)
17
18=== modified file 'setup.py'
19--- setup.py 2018-03-25 00:39:16 +0000
20+++ setup.py 2018-03-30 04:14:06 +0000
21@@ -63,8 +63,8 @@
22 }
23
24 # The list of packages is automatically generated later. Add other things
25-# that are part of BZRLIB here.
26-BZRLIB = {}
27+# that are part of BREEZY here.
28+BREEZY = {}
29
30 PKG_DATA = {# install files from selftest suite
31 'package_data': {'breezy': ['doc/api/*.txt',
32@@ -103,7 +103,7 @@
33 return sorted(packages)
34
35
36-BZRLIB['packages'] = get_breezy_packages()
37+BREEZY['packages'] = get_breezy_packages()
38
39
40 from distutils import log
41@@ -497,7 +497,7 @@
42 }
43
44 ARGS.update(META_INFO)
45- ARGS.update(BZRLIB)
46+ ARGS.update(BREEZY)
47 PKG_DATA['package_data']['breezy'].append('locale/*/LC_MESSAGES/*.mo')
48 ARGS.update(PKG_DATA)
49
50@@ -563,7 +563,7 @@
51 gui_target = copy.copy(target)
52 gui_target.dest_base = "bzrw"
53
54- packages = BZRLIB['packages']
55+ packages = BREEZY['packages']
56 packages.remove('breezy')
57 packages = [i for i in packages if not i.startswith('breezy.plugins')]
58 includes = []
59@@ -745,7 +745,7 @@
60 }
61
62 ARGS.update(META_INFO)
63- ARGS.update(BZRLIB)
64+ ARGS.update(BREEZY)
65 ARGS.update(PKG_DATA)
66
67 if __name__ == '__main__':

Subscribers

People subscribed via source and target branches