Skip to content

Commit

Permalink
make the default warning pattern case insensitive
Browse files Browse the repository at this point in the history
* WarningCountingShellCommand is a generic class so it seems reasonable to
  catch as many warnings as possible
  • Loading branch information
Mikhail Sobolev committed Aug 30, 2014
1 parent 54ae86c commit 5721b80
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion master/buildbot/steps/shell.py
Expand Up @@ -400,7 +400,7 @@ class WarningCountingShellCommand(ShellCommand):
renderables = ['suppressionFile']

warnCount = 0
warningPattern = '.*warning[: ].*'
warningPattern = '(?i).*warning[: ].*'
# The defaults work for GNU Make.
directoryEnterPattern = (u"make.*: Entering directory "
u"[\u2019\"`'](.*)[\u2019'`\"]")
Expand Down
8 changes: 5 additions & 3 deletions master/buildbot/test/unit/test_steps_shell.py
Expand Up @@ -703,12 +703,14 @@ def test_default_pattern(self):
ExpectShell(workdir='wkdir', usePTY='slave-config',
command=["make"])
+ ExpectShell.log('stdio',
stdout='normal: foo\nwarning: blarg!\nalso normal')
stdout='normal: foo\nwarning: blarg!\n'
'also normal\nWARNING: blarg!\n')
+ 0
)
self.expectOutcome(result=WARNINGS, status_text=["'make'", "warnings"])
self.expectProperty("warnings-count", 1)
self.expectLogfile("warnings (1)", "warning: blarg!\n")
self.expectProperty("warnings-count", 2)
self.expectLogfile("warnings (2)",
"warning: blarg!\nWARNING: blarg!\n")
return self.runStep()

def test_custom_pattern(self):
Expand Down

0 comments on commit 5721b80

Please sign in to comment.