Unity: Prevent unity from bailing on failed tests

I’m using unity on target and it works beautifully. However, when I have a test that fails, then all the other tests are skipped without any output due to the UNITY_FAIL_AND_BAIL macro in the assertion functions (leading to TEST_ABORT).

So far the only way to prevent this is to define UNITY_EXCLUDE_SETJMP_H in my unity_conf.h file, which might have some impact on mocking. Is there no other way to do this? I’ve never seen this behaviour when using ceedling, there the test execution continues on failures.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 15 (7 by maintainers)

Most upvoted comments

Thanks! I appreciate the kind words. You’ve identified our big goal there! I’m glad to know we’re near the target!

Yes, let’s keep it open. Memo to myself or whoever gets here first: Make TEST_PROTECT and TEST_ABORT redefineable. Also, add documentation for why you may care to do this (hint, read the entries above). 😃

Thanks, also for the superfast feedback! I’m very happy with unity, especially because it is not a blown-up solution and therefore so easy to integrate.