[Buildbot-devel] Trouble with addSuppression()

Vadim Zeitlin vz-buildbot at zeitlins.org
Wed Apr 15 15:25:13 UTC 2015


 Hello,

 I'm trying to understand how to use the addSuppression() method of
WarningCountingShellCommand in my configuration. It seems pretty
straightforward but doesn't seem to have any effect, even if I use the
filename and warning RE of "None" which should filter out all the warnings.

 To give more details, I'm using 0.8.9 under Debian and my master.cfg looks
like this:

---------------------------------- >8 --------------------------------------
def build_make_step(directory, **kwargs):
    step = Compile(
        ...
        # Match MSVC warning format:
        #
        #   file.c(123) : warning C1234: whatever
        warningPattern=r"^(.*?)\(([0-9]+)\) : warning ([A-Z]{1,3}[0-9]{4}: .*)" + "\r?$",
        warningExtractor=Compile.warnExtractFromRegexpGroups,
        **kwargs
    )

    step.addSuppression([
        # Avoid warnings about deprecated standard library functions in third
        # party code.
        (r"^.*\\src\\zlib\\.*\.c$", r"^C4996:.*", None, None),
        ...
    ])

    return step

def make_factory():
    return factory.buildfactory([
        ...,
        build_make_step(r"build\msw"),
        build_make_step(r"samples", haltonfailure=false),
        build_make_step(r"tests"),
        ...
    ])

c["builders"].append({
    ...
    "factory": make_factory(),
})
---------------------------------- >8 --------------------------------------

Everything seems to work fine except that I still get warnings in the log.
This build master is public and the latest log (temporarily hacked to run
just the first step of the build) can be seen at

http://buildbot.tt-solutions.com/wx/builders/wxMSW-VC8-full/builds/14/steps/libraries/

Does anybody see anything wrong with this configuration?

 As I don't, I tried, in desperation, debugging this by inserting log.msg()
calls into Buildbot code itself and from what I see in twistd.log, the
problem is that the maybeAddWarning() method is not called on the same step
object as the one I'm calling addSuppression() on, e.g. I see something
like this:

addSuppression(<buildbot.steps.shell.Compile object at 0x7f575420cbd0>) called with 3 suppressions
...
WarningCountingShellCommand <buildbot.steps.shell.Compile object at 0x7f5750260d90> created
maybeAddWarning(<buildbot.steps.shell.Compile object at 0x7f5750260fd0>) called, have 0 suppressions

(notice that the addresses are different). Could this be the source of my
problem and, if so, what could I do about it?

 Alternatively, does anybody have a working example of using
addSuppression()?

 Thanks in advance for any help!
VZ
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://buildbot.net/pipermail/devel/attachments/20150415/dea1950a/attachment.bin>


More information about the devel mailing list