Added one consistent building and testing system
authorBartosz Szatkowski <bulislaw@linux.com>
Fri, 6 Aug 2010 13:19:01 +0000 (15:19 +0200)
committerBartosz Szatkowski <bulislaw@linux.com>
Fri, 6 Aug 2010 13:19:01 +0000 (15:19 +0200)
mdictionary.pro
trunk/src/plugins/plugins.pro [new file with mode: 0644]
trunk/src/plugins/xdxf/tests/tests.pro [new file with mode: 0644]
trunk/src/plugins/xdxf/tests/unit_tests.pro [deleted file]
trunk/src/plugins/xdxf/xdxf.pro [new file with mode: 0644]
trunk/src/src.pro [new file with mode: 0644]
trunk/tests/mDictionaryTests/mDictionaryTests.pro
trunk/tests/mDictionaryTests/tst_Backbone.cpp
trunk/tests/tests.pro [new file with mode: 0644]
trunk/trunk.pro [new file with mode: 0644]

index 64f5f2d..1f61f8a 100644 (file)
@@ -12,5 +12,12 @@ isEmpty(MDICT_BINDIR) {
 message($$MDICT_BINDIR)
 
 TEMPLATE = subdirs
-SUBDIRS  = trunk/src/base/
-SUBDIRS += trunk/src/plugins/xdxf/src/
+SUBDIRS  = trunk
+#SUBDIRS += trunk/src/plugins/xdxf/src/
+
+check.target = check
+check.CONFIG = recursive
+check.recurse = trunk
+QMAKE_EXTRA_TARGETS += check
+
+
diff --git a/trunk/src/plugins/plugins.pro b/trunk/src/plugins/plugins.pro
new file mode 100644 (file)
index 0000000..a4ee0dc
--- /dev/null
@@ -0,0 +1,7 @@
+TEMPLATE = subdirs
+SUBDIRS = xdxf
+
+check.target = check
+check.CONFIG = recursive
+check.recurse = xdxf
+QMAKE_EXTRA_TARGETS += check
diff --git a/trunk/src/plugins/xdxf/tests/tests.pro b/trunk/src/plugins/xdxf/tests/tests.pro
new file mode 100644 (file)
index 0000000..4d319d7
--- /dev/null
@@ -0,0 +1,30 @@
+######################################################################
+# Automatically generated by qmake (1.07a) Wed Aug 4 11:35:12 2010
+######################################################################
+
+CONFIG += qtestlib
+TARGET = xdxfPluginTests
+TEMPLATE = app
+INCLUDEPATH += .
+
+# Input
+HEADERS += test.h \
+    ../src/xdxfplugin.h \
+    ../src/TranslationXdxf.h \
+    ../../../includes/translation.h \
+    ../../../includes/settings.h \
+    ../../../includes/DictDialog.h \
+    ../../../includes/CommonDictInterface.h \
+    ../src/XdxfDictDialog.h \
+    ../src/XdxfLoadDialog.h
+
+
+SOURCES += test.cpp \
+    ../src/xdxfplugin.cpp \
+    ../src/TranslationXdxf.cpp \
+    ../src/XdxfLoadDialog.cpp \
+    ../src/XdxfDictDialog.cpp
+
+check.target = check
+check.commands = ./xdxfPluginTests
+QMAKE_EXTRA_TARGETS += check
diff --git a/trunk/src/plugins/xdxf/tests/unit_tests.pro b/trunk/src/plugins/xdxf/tests/unit_tests.pro
deleted file mode 100644 (file)
index 4bf930c..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-######################################################################
-# Automatically generated by qmake (1.07a) Wed Aug 4 11:35:12 2010
-######################################################################
-
-CONFIG += qtestlib
-TEMPLATE = app
-INCLUDEPATH += .
-
-# Input
-HEADERS += test.h \
-    ../src/xdxfplugin.h \
-    ../src/TranslationXdxf.h \
-    ../../../includes/translation.h \
-    ../../../includes/settings.h \
-    ../../../includes/DictDialog.h \
-    ../../../includes/CommonDictInterface.h \
-    ../src/XdxfDictDialog.h \
-    ../src/XdxfLoadDialog.h
-
-
-SOURCES += test.cpp \
-    ../src/xdxfplugin.cpp \
-    ../src/TranslationXdxf.cpp \
-    ../src/XdxfLoadDialog.cpp \
-    ../src/XdxfDictDialog.cpp
diff --git a/trunk/src/plugins/xdxf/xdxf.pro b/trunk/src/plugins/xdxf/xdxf.pro
new file mode 100644 (file)
index 0000000..8d580f3
--- /dev/null
@@ -0,0 +1,7 @@
+TEMPLATE=subdirs
+SUBDIRS=src tests
+
+check.target = check
+check.CONFIG = recursive
+check.recurse = tests
+QMAKE_EXTRA_TARGETS += check
diff --git a/trunk/src/src.pro b/trunk/src/src.pro
new file mode 100644 (file)
index 0000000..1d0fa3e
--- /dev/null
@@ -0,0 +1,7 @@
+TEMPLATE=subdirs
+SUBDIRS = plugins
+
+check.target = check
+check.CONFIG = recursive
+check.recurse = plugins
+QMAKE_EXTRA_TARGETS += check
index 860fc75..9c9ea98 100644 (file)
@@ -7,7 +7,7 @@
 QT       += testlib core
 
 
-TARGET = tst_Backbone
+TARGET = mDictionaryTests
 CONFIG   += console
 CONFIG   -= app_bundle
 
@@ -25,3 +25,8 @@ HEADERS += \
     ../../src/includes/settings.h \
     ../../src/includes/CommonDictInterface.h \
     TranslationMock.h
+
+check.target = check
+check.commands += ./mDictionaryTests
+QMAKE_EXTRA_TARGETS += check
+
index c39f9f7..447f1a1 100644 (file)
@@ -27,6 +27,7 @@
 #include <QtCore/QString>
 #include <QtTest/QtTest>
 #include <QList>
+#include <QTime>
 #include "../../src/base/backbone/backbone.h"
 #include "CommonDictInterfaceMock.h"
 
@@ -186,9 +187,14 @@ void BackboneTest::translationTest() {
 
     addDicts();
 
+    QTime time;
+    time.start();
     back->search("nic");
+    qDebug() << "Time for backbone.search: " << time.elapsed();
     usleep(2000);
+    time.start();
     back->translation();
+    qDebug() << "Time for backbone->translation: " << time.elapsed();
 
     QVERIFY2(translatS.count() == 1, "Lost finall 'ready()' signal");
     QVERIFY2(back->result().size() == total*2, "Lost some of the translations");
diff --git a/trunk/tests/tests.pro b/trunk/tests/tests.pro
new file mode 100644 (file)
index 0000000..ea018f0
--- /dev/null
@@ -0,0 +1,7 @@
+TEMPLATE=subdirs
+SUBDIRS = mDictionaryTests
+
+check.target = check
+check.CONFIG = recursive
+check.recurse = mDictionaryTests
+QMAKE_EXTRA_TARGETS += check
diff --git a/trunk/trunk.pro b/trunk/trunk.pro
new file mode 100644 (file)
index 0000000..0739438
--- /dev/null
@@ -0,0 +1,7 @@
+TEMPLATE=subdirs
+SUBDIRS = tests src 
+
+check.target = check
+check.CONFIG = recursive
+check.recurse = tests src
+QMAKE_EXTRA_TARGETS += check