Merge PR #169: Move nymeatestbase into a nymea-testlib to speed up building

pull/173/head
Jenkins 2019-06-19 23:52:18 +02:00
commit e34a36ccfe
8 changed files with 28 additions and 7 deletions

View File

@ -1,2 +1,3 @@
usr/tests/* usr/lib/@DEB_HOST_MULTIARCH@/nymea/tests usr/tests/* usr/lib/@DEB_HOST_MULTIARCH@/nymea/tests
usr/lib/@DEB_HOST_MULTIARCH@/nymea/plugins/libnymea_devicepluginmock.so usr/lib/@DEB_HOST_MULTIARCH@/nymea/plugins/libnymea_devicepluginmock.so
usr/lib/@DEB_HOST_MULTIARCH@/libnymea-testlib.so*

View File

@ -45,7 +45,7 @@ INSTALLS += translations
QMAKE_EXTRA_TARGETS += lupdate lrelease QMAKE_EXTRA_TARGETS += lupdate lrelease
test.depends = licensecheck lrelease test.depends = licensecheck lrelease
test.commands = LD_LIBRARY_PATH=$$top_builddir/libnymea-core:$$top_builddir/libnymea make check test.commands = LD_LIBRARY_PATH=$$top_builddir/libnymea-core:$$top_builddir/libnymea:$$top_builddir/tests/testlib make check
QMAKE_EXTRA_TARGETS += test QMAKE_EXTRA_TARGETS += test
# Show doc files in project tree # Show doc files in project tree

View File

@ -1,4 +1,5 @@
TEMPLATE = subdirs TEMPLATE = subdirs
SUBDIRS = versioning \ SUBDIRS = versioning \
devices \ devices \
jsonrpc \ jsonrpc \
@ -25,3 +26,4 @@ SUBDIRS = versioning \
usermanager \ usermanager \
mqttbroker \ mqttbroker \
tags \ tags \

View File

@ -3,16 +3,13 @@ CONFIG += testcase
INCLUDEPATH += $$top_srcdir/libnymea \ INCLUDEPATH += $$top_srcdir/libnymea \
$$top_srcdir/libnymea-core \ $$top_srcdir/libnymea-core \
$$top_srcdir/tests/auto/ $$top_srcdir/tests/testlib/
LIBS += -L$$top_builddir/libnymea/ -lnymea \ LIBS += -L$$top_builddir/libnymea/ -lnymea \
-L$$top_builddir/libnymea-core/ -lnymea-core \ -L$$top_builddir/libnymea-core/ -lnymea-core \
-L$$top_builddir/tests/testlib/ -lnymea-testlib \
-L$$top_builddir/plugins/mock/ \ -L$$top_builddir/plugins/mock/ \
-lssl -lcrypto -lavahi-common -lavahi-client -lnymea-remoteproxyclient -lssl -lcrypto -lavahi-common -lavahi-client -lnymea-remoteproxyclient
SOURCES += ../nymeatestbase.cpp \
HEADERS += ../nymeatestbase.h \
target.path = /usr/tests target.path = /usr/tests
INSTALLS += target INSTALLS += target

19
tests/testlib/testlib.pro Normal file
View File

@ -0,0 +1,19 @@
TEMPLATE = lib
TARGET = nymea-testlib
include(../../nymea.pri)
QT += testlib network sql
INCLUDEPATH += $$top_srcdir/libnymea \
$$top_srcdir/libnymea-core
LIBS += -L$$top_builddir/libnymea/ -lnymea \
-L$$top_builddir/libnymea-core/ -lnymea-core \
-lssl -lcrypto -lnymea-remoteproxyclient
HEADERS += nymeatestbase.h
SOURCES += nymeatestbase.cpp
target.path = $$[QT_INSTALL_LIBS]
INSTALLS += target

View File

@ -1,3 +1,5 @@
TEMPLATE = subdirs TEMPLATE = subdirs
SUBDIRS = auto tools/simplepushbuttonhandler SUBDIRS = testlib auto tools/simplepushbuttonhandler
auto.depends += testlib