Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Code coverage does not work with GHUNIT_AUTOEXIT #148

dodikk opened this Issue · 4 comments

2 participants

Steps :
  1. Set up coverage flags as described in
  2. Apply the flush() patch
  3. Set ghunit environment as shown below and run the application
    setenv("GHUNIT_AUTORUN" , "YES", 1);
    setenv("WRITE_JUNIT_XML", "YES", 1);
    setenv("GHUNIT_AUTOEXIT", "YES", 1);
Acutal result :

Coverage files not generated ( shows nothing)

Expected result :
Coverage files generated successfully in the "build intermediates" directory

When disabling GHUNIT_AUTOEXIT flag and closing the simulator using the "home button" coverage files are generated just fine


The patch uses a UIApplicationDidEnterBackgroundNotification notification.

Either the notification should be fired or __gcov_flush() should be invoked on GHUNIT_AUTOEXIT condition.
Implementation approach :


Fixed in #149
Please merge


Hi, pls, I am wondering to know when it will be merged.


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.