3

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.

user3305763
  • 59
  • 10
  • Are you sure you have to add the quotes `\"` in the strings? – agold Oct 09 '15 at 09:01
  • Even if I try doin QMAKE_CC = "\"C:/Program Files (x86)/BullseyeCoverage/bin/cl"\" QMAKE_LINK = "\"C:/Program Files (x86)/BullseyeCoverage/bin/link"\" It doesnt work. – user3305763 Oct 09 '15 at 10:35
  • link.exe and cl.exe are the files present in bullseye bin folder – user3305763 Oct 09 '15 at 10:42
  • http://www.bullseye.com/help/tool-qtCreator.html Check this link as well – user3305763 Oct 09 '15 at 10:57
  • Open a command line in a temporary (empty) directory. Type `cl` and execute it with `Enter`. What is the output? If the output string contains "BullseyeCoverage" (or something similar) the [interceptor](http://www.bullseye.com/help/build-integration.html) works. Else the interceptor is not configured correctly (maybe the order in the path variable is incorrect). – TobiMcNamobi Oct 14 '15 at 08:35
  • I am getting this as output -->>> BullseyeCoverage Compile C++ 8.9.45 Windows License 3216 error: cannot find compiler cl. PATH=C:\Program Files (x86)\BullseyeCoverage\bin; and other paths – user3305763 Oct 15 '15 at 13:09
  • 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. – user3305763 Oct 26 '15 at 05:30

1 Answers1

0

Issue was solved by submitter and should be closed.

Submitter said the following in the question comments section, instead of writing an answer:

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.


For anyone else having coverage generation issues with Bullseye, be sure to also check their troubleshooting:

Mathieu
  • 8,840
  • 7
  • 32
  • 45
  • 1
    As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – MD. RAKIB HASAN Dec 15 '21 at 10:50