Merge ~cjwatson/launchpad-buildd:tests-breezy into launchpad-buildd:master

Proposed by Colin Watson
Status: Merged
Approved by: Colin Watson
Approved revision: 1f06242b9da2add2cb51ef5a680248449aa9f9ce
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: ~cjwatson/launchpad-buildd:tests-breezy
Merge into: launchpad-buildd:master
Diff against target: 27 lines (+6/-3)
1 file modified
lpbuildd/target/tests/test_generate_translation_templates.py (+6/-3)
Reviewer Review Type Date Requested Status
Jürgen Gmach Approve
Review via email: mp+415818@code.launchpad.net

Commit message

Handle running the test suite with Breezy

Description of the change

We need to set `BRZ_*` environment variables in tests as well as `BZR_*`.

focal's `bzr` package is in fact a transitional package for Breezy, so tests fail on focal without this.

To post a comment you must log in.
Revision history for this message
Jürgen Gmach (jugmac00) wrote :

This fix seems only relevant when you have a setup different from the one described in https://launchpad-buildd.readthedocs.io/en/latest/how-to/developing.html

Did you install Breezy manually? Or is Breezy the new default Bazaar handling tool in e.g. Jammy?

It would be great to add some more information to the commit message.

review: Approve
Revision history for this message
Colin Watson (cjwatson) wrote :

On focal:

  $ apt-cache show bzr
  Package: bzr
  ...
  Description-en: transitional dummy package for brz
   This is a transitional package, replacing the Bazaar packaging
   with the Breezy packaging.

So if you follow the development setup instructions on focal instead of bionic you'll see this problem. I'll adjust the commit message to explain this.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/lpbuildd/target/tests/test_generate_translation_templates.py b/lpbuildd/target/tests/test_generate_translation_templates.py
2index 54ac395..0b72b29 100644
3--- a/lpbuildd/target/tests/test_generate_translation_templates.py
4+++ b/lpbuildd/target/tests/test_generate_translation_templates.py
5@@ -56,16 +56,19 @@ class TestGenerateTranslationTemplates(TestCase):
6 """Make a bzr branch from an existing directory."""
7 bzr_home = self.useFixture(TempDir()).path
8 self.useFixture(EnvironmentVariable("BZR_HOME", bzr_home))
9+ self.useFixture(EnvironmentVariable("BRZ_HOME", bzr_home))
10 self.useFixture(EnvironmentVariable("BZR_EMAIL"))
11+ self.useFixture(EnvironmentVariable("BRZ_EMAIL"))
12 self.useFixture(EnvironmentVariable("EMAIL"))
13
14 subprocess.check_call(["bzr", "init", "-q"], cwd=branch_path)
15 subprocess.check_call(["bzr", "add", "-q"], cwd=branch_path)
16 committer_id = "Committer <committer@example.com>"
17 with EnvironmentVariable("BZR_EMAIL", committer_id):
18- subprocess.check_call(
19- ["bzr", "commit", "-q", "-m", "Populating branch."],
20- cwd=branch_path)
21+ with EnvironmentVariable("BRZ_EMAIL", committer_id):
22+ subprocess.check_call(
23+ ["bzr", "commit", "-q", "-m", "Populating branch."],
24+ cwd=branch_path)
25
26 def make_git_branch(self, branch_path):
27 subprocess.check_call(["git", "init", "-q"], cwd=branch_path)

Subscribers

People subscribed via source and target branches