The problem is Surefire and, as far as I can see, this failsafe plugin, are made for Java unit tests, while in our case we test C++ applications. As far as Maven is concerned, we just execute a script with exec plugin, which returns 0 or 1, and if it returns 1, then the deploy should fail, BUT NOT the post-integration-test.

So the solution would probably be to write our own plugin which does the hack you mentioned?


Stephen Connolly wrote:
wrap your bash scripts in a bash script that checks the exit code and
creates a file based on the exit code.

then attach an execution to the verify phase that checks your file.

Essentially, the rule for integration-test is to _never_ fail the build...

hence: failsafe-maven-plugin as an alternative to surefire... it
splits the test execution from the test result checking to ensure that
the post-integration-test phase always runs

-Stephen

2009/11/23 Gajo Csaba <[email protected]>:
Hello,

We're doing some integration tests with bash scripts, and these are executed
with Maven's exec plugin. When the test works, it returns 0, when it fails,
it returns 1. When it returns 1, the exec plugin will fail and the
post-integration-test goal will not be executed. It is crucial for it to be
executed to clean up the environment. I saw this issue came up 3 years ago
at http://jira.codehaus.org/browse/MNG-2142 but the fix is available only
for Maven version 3?

Is there a way to force the execution of post-integration-test even if the
integration-test fails? Or I have to write my own plugin?

Thanks, Csaba




---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to