Navigation Menu

Skip to content

Commit

Permalink
tests: skip tst_displaylabelgroups() if MLITE is not available
Browse files Browse the repository at this point in the history
This is a workaround for issue #5.

We also remove the `CONFIG += link_pkgconfig` from `engine.pro` because
this directive is already set in `config.pri`.
  • Loading branch information
mardy committed Jun 25, 2019
1 parent 7247050 commit f997865
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
4 changes: 4 additions & 0 deletions config.pri
Expand Up @@ -2,3 +2,7 @@ CONFIG += \
c++11 \
link_pkgconfig
PKGCONFIG += Qt5Contacts

packagesExist(mlite5) {
DEFINES += HAS_MLITE
}
3 changes: 1 addition & 2 deletions src/engine/engine.pro
Expand Up @@ -12,10 +12,9 @@ CONFIG += plugin hide_symbols
PLUGIN_TYPE=contacts
DESTDIR=$${PLUGIN_TYPE}

CONFIG += link_pkgconfig
packagesExist(mlite5) {
PKGCONFIG += mlite5
DEFINES += HAS_MLITE
# The `DEFINES` directive is already set in `config.pri`
} else {
warning("mlite not available. Display label groups will be generated from last name.")
}
Expand Down
3 changes: 3 additions & 0 deletions tests/auto/displaylabelgroups/test/tst_displaylabelgroups.cpp
Expand Up @@ -139,6 +139,9 @@ void tst_DisplayLabelGroups::cleanup()

void tst_DisplayLabelGroups::testDisplayLabelGroups()
{
#ifndef HAS_MLITE
QSKIP("Test has wrong expectations if MLITE is not available");
#endif
// this test relies on the display label grouping
// semantics provided by the testdlggplugin.

Expand Down

0 comments on commit f997865

Please sign in to comment.