Merge lp://staging/~jml/launchpad/split-mail-and-summary into lp://staging/launchpad

Proposed by Jonathan Lange
Status: Merged
Approved by: Robert Collins
Approved revision: no longer in the source branch.
Merged at revision: 11596
Proposed branch: lp://staging/~jml/launchpad/split-mail-and-summary
Merge into: lp://staging/launchpad
Diff against target: 551 lines (+259/-46)
3 files modified
lib/devscripts/ec2test/remote.py (+87/-15)
lib/devscripts/ec2test/tests/test_remote.py (+168/-30)
lib/lp/services/job/tests/test_runner.py (+4/-1)
To merge this branch: bzr merge lp://staging/~jml/launchpad/split-mail-and-summary
Reviewer Review Type Date Requested Status
Robert Collins (community) Approve
Review via email: mp+36111@code.staging.launchpad.net

Commit message

Improve the email sent by ec2 test.

Description of the change

Hello,

This branch changes the email sent by ec2 test. Rather than being a mere lump of stuff that we have collected as summary, it's a custom built message derived from the test results.

Examples:
  * http://paste.ubuntu.com/497557/
  * http://paste.ubuntu.com/497555/

Implementation-wise, the main trick is to change EC2Tester, the object responsible for running tests and gathering results, to send its TestResult object back to the logger, rather than a simple boolean. The Logger was then changed to use the new format_result method to compose the result email, rather than simply dumping the summary.

The details:
  * If the test child process exits with a non-zero code and we have no test results, we raise an error, since it's likely to be something weird.

  * Included in the diff are changes from a merge proposal that I should have applied before landing my previous branch. Mostly stylistic.

  * Some tests were incorrect. They used a dictionary to fake an email message, but had the subject stored under the wrong key ("Subject:" rather than "Subject").

I look forward to your review.

jml

To post a comment you must log in.
Revision history for this message
Robert Collins (lifeless) wrote :

This is nice.

A few thoughts for now, or later, or never.

Perhaps testrepository would make this a lot smaller? Like tiny?

Perhaps Fixtures would make some of the test machinery a little cleaner. (we can use them in LP).

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.