Prerequisite: lcov. Install via sudo apt-get install lcov
$ make COV=1
$ cd bin && ./app && cd ..
$ make gen_cov_html
Then open html/index.html
, where amazing happens!
sgx_cov supports xargo as well:
$ XARGO_SGX=1 make COV=1
$ cd bin && ./app && cd ..
$ XARGO_SGX=1 make gen_cov_html
- Enable feature
global_exit
forsgx_urts
- Inject an
on exit
function usingglobal_dtors_object!
macro, and invokesgx_cov::cov_writeout()
.gcno
would be generated during compile time atTarget_Dir
.gcna
would be generated during run time atTarget_dir
make gen_cov_html
would process.gcno
and.gcna
and generate html results.
To be continued ...