New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return code ignored for Compile step #3774

Closed
blikjeham opened this Issue Nov 23, 2017 · 4 comments

Comments

Projects
None yet
3 participants
@blikjeham

blikjeham commented Nov 23, 2017

I have a Compile buildstep that calls 'make check' and contains a decodeRC directive to transform the exit status to a warning. Besides the decodeRC, I also have a warningPattern to fetch errors/warnings from the checks. The command looks like this:

make_check = Compile(
    command=['make', 'check'],
    warningPattern='^(WARNING|ERROR).*',
    haltOnFailure=False,
    warnOnFailure=True,
    warnOnWarnings=True,
    decodeRC={
        0: SUCCESS,
        1: WARNINGS,
        2: WARNINGS
    }
)

When the 'make check' command fails, e.g. there is no make target called 'check', the return code is 2, but the step is still successful. When the command runs successfully and output matches the warningPattern, the buildstep is set to warning correctly.

I see the following in the twistd.log when the command fails with return code 2:

[Broker,2,x.x.x.x] <RemoteShellCommand '['make', 'check']'> rc=2
step 'make check' complete: success (None)

What am I missing here? I am using buildbot 0.9.13.

@lancelodliu

This comment has been minimized.

Show comment
Hide comment
@lancelodliu

lancelodliu Dec 1, 2017

Contributor

You may check the return value of your Compile buildstep. decodeRC works only for the ShellCommand step.

Contributor

lancelodliu commented Dec 1, 2017

You may check the return value of your Compile buildstep. decodeRC works only for the ShellCommand step.

tardyp added a commit to tardyp/buildbot that referenced this issue Dec 1, 2017

@tardyp

This comment has been minimized.

Show comment
Hide comment
@tardyp

tardyp Dec 1, 2017

Member

Compile is a subclass of ShellCommand, so it should work. I just made a PR with a fix for this bug.

Member

tardyp commented Dec 1, 2017

Compile is a subclass of ShellCommand, so it should work. I just made a PR with a fix for this bug.

@tardyp tardyp referenced this issue Dec 1, 2017

Merged

fix decodeRC ignored for Compile step #3793

2 of 2 tasks complete
@tardyp

This comment has been minimized.

Show comment
Hide comment
@tardyp

tardyp Dec 4, 2017

Member

@blikjeham could you please test if #3793 is working for you

Member

tardyp commented Dec 4, 2017

@blikjeham could you please test if #3793 is working for you

@blikjeham

This comment has been minimized.

Show comment
Hide comment
@blikjeham

blikjeham Dec 7, 2017

@tardyp, I have verified that #3793 is working correctly. Thank you very much!

blikjeham commented Dec 7, 2017

@tardyp, I have verified that #3793 is working correctly. Thank you very much!

@tardyp tardyp closed this Dec 7, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment