I’m trying to enable the native coverage from OTP 27, but so far nothing has worked.
I’ve added erlc_options: [:debug_info, :line_coverage, {:line_coverage, true}] to the project config and set the environment variable ERL_AFLAGS="+JPcover true", but it didn’t do anything.
I added these lines to a test to see what is happening:
dbg :code.coverage_support() # true
dbg :code.get_coverage_mode() # :line_counters
dbg :code.get_coverage_mode(mod) # :none
All project modules have :none as the coverage mode, only if I run with :cover that it changes to :line_counters.
Is there a way to have coverage without :cover compiling the modules? Locally :cover compile takes 7 seconds, so I’m trying to find a way to speed it up, or to have coverage without using it.






















