How to make builds containing expected "JVM crashed" pass?

Answered

Hi,

We have a build that might crash the JVM (we're testing JDWP), i.e. in this build, we'll start a JVM and its crashing is totally expected. However, even our build succeeds (return 0), TeamCity still detects the JVM crashing keyword in test output and marks that build as a failure. How can we resolve this issue?

You can see the build log via the guest user.

https://builds.gradle.org/viewLog.html?buildId=30922043&buildTypeId=Gradle_Check_Parallel_7_bucket22&tab=buildLog

1 comment
Comment actions Permalink

Hi,

 

that's quite a unique requirement. There is a build failure condition enabled by default that fails build on crashes, so you should be able to disable it under the build configuration - Failure conditions . As a reminder, returning 0 means that a build "step" has succeeded, not a "build". Returning 0 is only one of the conditions for a build to succeed (or fail).

 

As another option if that wouldn't work for you, you can also manually set the status of a build via service messages, so you could probably run a step that checks for some expected result out of a crashed jvm (maybe a crash dump?) https://www.jetbrains.com/help/teamcity/build-script-interaction-with-teamcity.html#BuildScriptInteractionwithTeamCity-ReportingBuildStatus

0

Please sign in to leave a comment.