Merge lp:~jtv/launchpad/bug-520651 into lp:launchpad
Status: | Merged |
---|---|
Approved by: | Muharem Hrnjadovic |
Approved revision: | no longer in the source branch. |
Merged at revision: | not available |
Proposed branch: | lp:~jtv/launchpad/bug-520651 |
Merge into: | lp:launchpad |
Diff against target: |
132 lines (+56/-21) 2 files modified
lib/canonical/buildd/generate_translation_templates.py (+7/-2) lib/canonical/buildd/tests/test_generate_translation_templates.py (+49/-19) |
To merge this branch: | bzr merge lp:~jtv/launchpad/bug-520651 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Muharem Hrnjadovic (community) | code | Approve | |
Review via email: mp+20632@code.launchpad.net |
Commit message
Let TranslationTemp
Description of the change
= Bug 520651 =
This ticks off one to-do item on the project of using the build farm to generate translation templates based on source code from a bzr branch. The item is: to make the slave code retrieve the source code from the branch.
I used the equivalent of a "bzr export" for this, which is the lightest-weight operation I could find that did the job. All it retrieves is the contents of the branch, in its current revision.
The test is not entirely realistic: it uses the pull URL for the branch (which is implemented using a Launchpad custom protocol that maps to file://) instead of the http public URL that the real build slave will get. The custom protocol requires the Launchpad bzr plugins, and special access to the bzr server. The real slave will go through plain http. The http way is more manageable when it comes to firewall holes, but as far as I've been able to find out from various knowledgeable developers, impossible to integration-test. Our test setup doesn't include http access to branches.
No lint. For Q/A we'll need some intimate time with dogfood and instructions on its use; if it fails we'll get TranslationTemp
To test,
{{{
./bin/test -vv -t test_generate_
}}}
You'll notice that the test no longer needs a MockGenerateTra
In case the extraction of a method to create and populate a branch seems overweight: I have a feeling it may be a candidate for future reuse in the same test, but isn't quite worth moving into the factory either.
Jeroen
Looks good!