testing - Setup a test build job in hudson that detects when make fails to compile -


i have set 'freestyle project' in hudson checks source-code out svn repository. added 'shell step' build code:

echo "# $job_name: $build_id" >log cd to/my/path/ qmake &>>$workspace/log make &>>$workspace/log 

after running test, hudson says t succeeded. when console output of build find:

in file included src/tut.h:47,                  src/tut3module.cpp:1: src/log.h:69: error: ‘uint8_t’ has not been declared make: *** [obj/tut3module.o] fehler 1 finished: success 

why hudson not recognize error? how have configure job?

let me know if need more information configuration!

thanks help!

hudson uses error code of build step determine if build step successful or failed. whole build step converted 1 script. if don't call exit somewhere in script exit code of last command of script becomes exit code of script.

see following script

copy readme.txt dd: type readme.txt 

let's assume readme.txt exists. copy fail errorcode 1, because dd: unknown device. type command succeed , therefore build step return success. either separate build commands or check error code after each command. sysadmin recommended third approach me: run script , check results. in case, build should have worked whenever build artifacts exists.

of course can use log parser plugin mentioned sagar. if can avoid it, go script checks error codes rather, rely on log parser. btw, there commands deviate standard , return non-zero error code, in success case.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -