PDA

View Full Version : Bullseye Code Coverage for Qt



Jay Sanghavi
9th October 2015, 11:05
Hey I am facing an issue regarding bullseye code coverage with Qt. In my .pro file I am adding the following:

QMAKE_CC = "\"C:/Program Files (x86)/BullseyeCoverage/bin/cl"\"
QMAKE_CXX = $$QMAKE_CC
QMAKE_LINK = "\"C:/Program Files (x86)/BullseyeCoverage/bin/link"\"
Then Performing below commands: Build Run Run qmake Rebuild

It is not generating test.cov(coverage) file anywhere in the system.I have added Bullseye path in the system environment path variable. Also, in Bullseye application,I have enabled the option for GNU C/C++ and also clicked on the Coverage Build option in tools.Please help.

Jay Sanghavi
26th October 2015, 05:16
Issue Solved:

Instead of adding changes in the .pro file to override the variables in qmake.config(internal QT file), Just make direct changes in Qt file itself.

QMAKE_CC = "\"C:/Program Files (x86)/BullseyeCoverage/bin/gcc"\"
QMAKE_LINK_C = $$QMAKE_CC
QMAKE_CXX = "\"C:/Program Files (x86)/BullseyeCoverage/bin/g++"\"
QMAKE_LINK = $$QMAKE_CXX

There are high chances of facing some linking issues if you dont add the above code in the config file of Qt.
NOTE: This was Qt cross-compilation issue which is now fixed by adding the above code.