enable coverage for deviceplugins too
This commit is contained in:
parent
ca91386b7d
commit
a9a2a8fd30
5
guh.pri
5
guh.pri
@ -1,10 +1,11 @@
|
|||||||
|
# Parse and export GUH_VERSION_STRING
|
||||||
GUH_VERSION_STRING=$$system('dpkg-parsechangelog | sed -n -e "s/^Version: //p"')
|
GUH_VERSION_STRING=$$system('dpkg-parsechangelog | sed -n -e "s/^Version: //p"')
|
||||||
|
DEFINES += GUH_VERSION_STRING=\\\"$${GUH_VERSION_STRING}\\\"
|
||||||
|
|
||||||
|
# Enable coverage option
|
||||||
coverage {
|
coverage {
|
||||||
message("Building coverage.")
|
|
||||||
QMAKE_CXXFLAGS += -fprofile-arcs -ftest-coverage -O0
|
QMAKE_CXXFLAGS += -fprofile-arcs -ftest-coverage -O0
|
||||||
LIBS += -lgcov
|
LIBS += -lgcov
|
||||||
QMAKE_LFLAGS += -fprofile-arcs
|
QMAKE_LFLAGS += -fprofile-arcs
|
||||||
}
|
}
|
||||||
|
|
||||||
DEFINES += GUH_VERSION_STRING=\\\"$${GUH_VERSION_STRING}\\\"
|
|
||||||
|
|||||||
4
guh.pro
4
guh.pro
@ -14,3 +14,7 @@ licensecheck.commands = $$top_srcdir/tests/auto/checklicenseheaders.sh $$top_src
|
|||||||
test.depends = licensecheck check
|
test.depends = licensecheck check
|
||||||
|
|
||||||
QMAKE_EXTRA_TARGETS += licensecheck doc test
|
QMAKE_EXTRA_TARGETS += licensecheck doc test
|
||||||
|
|
||||||
|
coverage {
|
||||||
|
message("Building coverage.")
|
||||||
|
}
|
||||||
|
|||||||
@ -312,6 +312,11 @@ void DevicePluginMock::emitDeviceSetupFinished()
|
|||||||
{
|
{
|
||||||
qDebug() << "emitting setup finised";
|
qDebug() << "emitting setup finised";
|
||||||
Device *device = m_asyncSetupDevices.takeFirst();
|
Device *device = m_asyncSetupDevices.takeFirst();
|
||||||
|
if (!myDevices().contains(device)) {
|
||||||
|
qWarning() << "Should emit deviceSetupFinished but device seems to have gone.";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (device->deviceClassId() == mockDeviceAsyncSetupClassId) {
|
if (device->deviceClassId() == mockDeviceAsyncSetupClassId) {
|
||||||
emit deviceSetupFinished(device, DeviceManager::DeviceSetupStatusSuccess, QString());
|
emit deviceSetupFinished(device, DeviceManager::DeviceSetupStatusSuccess, QString());
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -1,3 +1,5 @@
|
|||||||
|
include(../guh.pri)
|
||||||
|
|
||||||
TEMPLATE = lib
|
TEMPLATE = lib
|
||||||
CONFIG += plugin static c++11
|
CONFIG += plugin static c++11
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user