Command line build fails but Teamcity doesn't see it .

Hello all ,

I'm building my project with command line script.
One of the builds fail :

collect2: ld returned 1 exit status
[17:19:47]: [Step 2/2] make: *** [OSALCuteTest] Error 1
[17:19:48]: [Step 2/2] make: Nothing to be done for `all'.
[17:19:48]: [Step 2/2] /home/user/Projects/CI/checkout_folder/Tools/BuildScript/incremental_build
[17:19:48]: [Step 2/2] Process exited with code 0
[17:19:48]: Publishing internal artifacts
[17:19:47]: [Step 2/2] make: *** [OSALCuteTest] Error 1
[17:19:48]: [Step 2/2] make: Nothing to be done for `all'.
[17:19:48]: [Step 2/2] /home/user/Projects/CI/checkout_folder/Tools/BuildScript/incremental_build
[17:19:48]: [Step 2/2] Process exited with code 0
[17:19:48]: Publishing internal artifacts
[17:19:48]: [Publishing internal artifacts] Sending build.finish.properties file
[17:19:48]: Build finished

TeamCity doesn't register this for a failure, Why ? (becaouse the process exits with code 0)

The script just run's :" make all "

Thank you.

Vadim.

3 comments
Comment actions Permalink

[17:19:48]: [Step 2/2] /home/user/Projects/CI/checkout_folder/Tools/BuildScript/incremental_build
[17:19:48]: [Step 2/2] Process exited with code 0

It says the process exited with code 0. TeamCity regards 0 as success.
Make sure your build script catches the exit codes and passes it up to the shell.

0
Comment actions Permalink

Hi Vadim

1. Instead of 'make ...' you may use Make-Runner plugin.
     Warning: plugin is unstable (it makes project but build log may be strange).
     I'll be grateful if you would participate in its testing.
     download plugin zip file  
     see Installing Additional Plugin instruction.


2. Also you can enable 'Fail build on error message'.

3. Check that make not ignoring non-zero exit status:
     http://www.opussoftware.com/tutorial/TutMakefile.htm#Shell Lines
     "The “–” prefix tells Make to ignore the exit status of shell line."


  

0
Comment actions Permalink

Thanks a lot Vladislav I will give it a try !

0

Please sign in to leave a comment.