enable coverage for deviceplugins too

pull/1/head
Michael Zanetti 2014-05-04 13:33:05 +02:00
parent ca91386b7d
commit a9a2a8fd30
4 changed files with 14 additions and 2 deletions

View File

@ -1,10 +1,11 @@
# Parse and export GUH_VERSION_STRING
GUH_VERSION_STRING=$$system('dpkg-parsechangelog | sed -n -e "s/^Version: //p"')
DEFINES += GUH_VERSION_STRING=\\\"$${GUH_VERSION_STRING}\\\"
# Enable coverage option
coverage {
message("Building coverage.")
QMAKE_CXXFLAGS += -fprofile-arcs -ftest-coverage -O0
LIBS += -lgcov
QMAKE_LFLAGS += -fprofile-arcs
}
DEFINES += GUH_VERSION_STRING=\\\"$${GUH_VERSION_STRING}\\\"

View File

@ -14,3 +14,7 @@ licensecheck.commands = $$top_srcdir/tests/auto/checklicenseheaders.sh $$top_src
test.depends = licensecheck check
QMAKE_EXTRA_TARGETS += licensecheck doc test
coverage {
message("Building coverage.")
}

View File

@ -312,6 +312,11 @@ void DevicePluginMock::emitDeviceSetupFinished()
{
qDebug() << "emitting setup finised";
Device *device = m_asyncSetupDevices.takeFirst();
if (!myDevices().contains(device)) {
qWarning() << "Should emit deviceSetupFinished but device seems to have gone.";
return;
}
if (device->deviceClassId() == mockDeviceAsyncSetupClassId) {
emit deviceSetupFinished(device, DeviceManager::DeviceSetupStatusSuccess, QString());
} else {

View File

@ -1,3 +1,5 @@
include(../guh.pri)
TEMPLATE = lib
CONFIG += plugin static c++11