~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to buildout-templates/bin/retest.in

  • Committer: Launchpad Patch Queue Manager
  • Date: 2012-01-05 05:05:42 UTC
  • mfrom: (14632.1.5 implied-account)
  • Revision ID: launchpad@pqm.canonical.com-20120105050542-b4m54slx2mqa8htl
[r=wgrant][no-qa] EmailAddressSet.new now infers account from person
        if not specified explicitly.

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
import os
29
29
import re
30
30
import sys
31
 
from itertools import takewhile, imap
 
31
from itertools import takewhile
32
32
 
33
33
${python-relative-path-setup}
34
34
 
38
38
# Regular expression to match numbered stories.
39
39
STORY_RE = re.compile("(.*)/\d{2}-.*")
40
40
 
41
 
# Regular expression to remove terminal color escapes.
42
 
COLOR_RE = re.compile("\x1b[[][0-9;]+m")
43
 
 
44
 
 
45
 
def decolorize(text):
46
 
    """Remove all ANSI terminal color escapes from `text`."""
47
 
    return COLOR_RE.sub("", text)
48
 
 
49
41
 
50
42
def get_test_name(test):
51
43
    """Get the test name of a failed test.
99
91
 
100
92
 
101
93
if __name__ == '__main__':
102
 
    lines = imap(decolorize, fileinput.input())
103
 
    tests = extract_tests(lines)
 
94
    tests = extract_tests(fileinput.input())
104
95
    if len(tests) >= 1:
105
96
        run_tests(tests)
106
97
    else: