In my CI system,jenkins execute shell script to build ... The script like this:
docker run -d --rm -v /code-path:/tmp docker-iamge-name sh -c " \
cd /tmp ;\
mkdir build ;\
cd build ;\
cmake ../ ;\
make ;\
./unit-test-execute-file1 ;\
...
"
But when there are errors in code file, make command exits, and then next command(./unit-test-execute-file1) is executed. Since make failed, so unit-test-execute-file is not generated, and next command also fails... In the end, script exit with code 0, and Jenkins shows build is successful..
Can someone help? Thanks a lot!