Build shows as successful even though the sole job failed

Hi folks. I have a build with a test that I’ve deliberately broken. Although the UI correctly reports the build as failed, the text and the favicon are green. Any ideas why?

Setting errexit in the main shell messes up the build control logic.

Without set -e, I see apparently inconsistent behavior:
https://travis-ci.org/github/sky-map-team/stardroid/builds/738844948 shows as green (incorrectly) but
https://travis-ci.org/github/sky-map-team/stardroid/jobs/738844949 shows red (as expected).

AFAICT these two things reference the same github commit.

The last lines look suspicious

Done. Your build exited with 1.
emulator: Saving state on exit with session uptime 525266 ms

I believe you need to stop the emulator in after_script: – it exiting successfully after the job’s exit proper may be what’s skewing the build’s status.

Your only job is allowed to fail. The job fails, but the build succeeds.

2 Likes

Doh. Yes, that is it. The perils of cargo-culting someone else’s configuration!

Thanks for your help.