Refactoring and first bd tests

The goal of the refactoring is to support unit tests
for the db library.

For this, a distributed unit test concept has been
introduced (later to be extended to other libs).
Unit tests are shared objects called ".ut" and are
automatically loaded by the ut runner. The bd library
now has two folders - one for sources and one for the
unit tests. The sources are separated into lib and apps.

First unit tests for the writer options have been
provided.
This commit is contained in:
Matthias Koefferlein
2017-08-19 18:47:52 +02:00
parent b296cdd915
commit a9b64d1e57
42 changed files with 399 additions and 114 deletions
+8 -6
View File
@@ -1,17 +1,19 @@
DESTDIR_KLP = $$OUT_PWD/../../..
DESTDIR_UT = $$OUT_PWD/../../..
DESTDIR = $$OUT_PWD/..
TEMPLATE = lib
INCLUDEPATH += ../src ../../../db ../../../tl ../../../gsi ../../../laybasic ../../../lay ../../../common ../../../ut
DEPENDPATH += ../src ../../../db ../../../tl ../../../gsi ../../../laybasic ../../../lay ../../../common ../../../ut
LIBS += -L$$DESTDIR_KLP -lklayout_db -lklayout_tl -lklayout_gsi -lklayout_laybasic -lklayout_lay -lklayout_ut
INCLUDEPATH += ../src ../../../db ../../../tl ../../../gsi ../../../laybasic ../../../lay ../../../ut
DEPENDPATH += ../src ../../../db ../../../tl ../../../gsi ../../../laybasic ../../../lay ../../../ut
LIBS += -L$$DESTDIR_UT -lklayout_db -lklayout_tl -lklayout_gsi -lklayout_laybasic -lklayout_lay -lklayout_ut
QMAKE_RPATHDIR += $$DESTDIR
# Only on Windows, DESTDIR_TARGET is usable. On this platform, a blank happens to appear between
# $(DESTDIR) and $(TARGET)
win32 {
QMAKE_POST_LINK += $(COPY) $(DESTDIR_TARGET) $$DESTDIR_KLP/$${TARGET}.klp_ut
QMAKE_POST_LINK += $(COPY) $(DESTDIR_TARGET) $$DESTDIR_UT/$${TARGET}.ut
} else {
QMAKE_POST_LINK += $(COPY) $(DESTDIR)$(TARGET) $$DESTDIR_KLP/$${TARGET}.klp_ut
QMAKE_POST_LINK += $(COPY) $(DESTDIR)$(TARGET) $$DESTDIR_UT/$${TARGET}.ut
}