How to define failure situation on jenkins
By default Jenkins assumes whether the build is SUCCESS or not from build process exit code.

Which means that build exit with code 0 considered as SUCCESS, rest all are considered as FAILURE.

If your build step/process exit with code 0, even during the failure case then Jenkins will report the build is SUCCESS.

So I my suggestion is to run the all build steps manually and try to get the exit code on each step (for both PASS and FAIL case).