summaryrefslogtreecommitdiffstats
path: root/tests/auto/sql
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2014-01-23 20:06:40 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-01-29 06:40:49 +0100
commit85a26537372de2b81df0c13ba90ce74ae277d8c1 (patch)
treef823665a12d622fe78b1a7aba07f759c1c773245 /tests/auto/sql
parent69bf59ecfd061429e11231cb1fb90178d595baf1 (diff)
Enable running sql model tests in parallel
Each model test gets its own temporary directory, thus there is no problem parallelizing them. This should reduce the time spent for a testrun of qtbase by around 3 minutes. When running only the sql tests it saves less since there are no other tests to run in parallel. === Timing: =================== TEST RUN COMPLETED! ============================ Total: 4 minutes 43 seconds Serial tests: 4 minutes 42 seconds Parallel tests: 1 second Estimated time spent on insignificant tests: (no time) Estimated time saved by -j4: 1 second === Totals: 12 tests, 12 passes ================================================ After: === Timing: =================== TEST RUN COMPLETED! ============================ Total: 4 minutes 7 seconds Serial tests: 50 seconds Parallel tests: 3 minutes 17 seconds Estimated time spent on insignificant tests: (no time) Estimated time saved by -j4: 1 minute 23 seconds === Totals: 12 tests, 12 passes ================================================ Change-Id: I355ceed62fae852ad8cd442848e263438afb738e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Mark Brand <mabrand@mabrand.nl>
Diffstat (limited to 'tests/auto/sql')
-rw-r--r--tests/auto/sql/kernel/qsqldatabase/tst_databases.h5
-rw-r--r--tests/auto/sql/models/qsqlquerymodel/qsqlquerymodel.pro1
-rw-r--r--tests/auto/sql/models/qsqlrelationaltablemodel/qsqlrelationaltablemodel.pro1
-rw-r--r--tests/auto/sql/models/qsqltablemodel/qsqltablemodel.pro1
4 files changed, 6 insertions, 2 deletions
diff --git a/tests/auto/sql/kernel/qsqldatabase/tst_databases.h b/tests/auto/sql/kernel/qsqldatabase/tst_databases.h
index f87493205f..c0b558312f 100644
--- a/tests/auto/sql/kernel/qsqldatabase/tst_databases.h
+++ b/tests/auto/sql/kernel/qsqldatabase/tst_databases.h
@@ -299,8 +299,8 @@ public:
// use in-memory database to prevent local files
// addDb("QSQLITE", ":memory:");
- addDb( "QSQLITE", QDir::toNativeSeparators(QDir::tempPath()+"/foo.db") );
-// addDb( "QSQLITE2", QDir::toNativeSeparators(QDir::tempPath()+"/foo2.db") );
+ addDb( "QSQLITE", QDir::toNativeSeparators(dbDir.path() + "/foo.db") );
+// addDb( "QSQLITE2", QDir::toNativeSeparators(dbDir.path() + "/foo2.db") );
// addDb( "QODBC3", "DRIVER={SQL SERVER};SERVER=iceblink.qt-project.org\\ICEBLINK", "troll", "trond", "" );
// addDb( "QODBC3", "DRIVER={SQL Native Client};SERVER=silence.qt-project.org\\SQLEXPRESS", "troll", "trond", "" );
@@ -586,6 +586,7 @@ public:
QStringList dbNames;
int counter;
+ QTemporaryDir dbDir;
};
#endif
diff --git a/tests/auto/sql/models/qsqlquerymodel/qsqlquerymodel.pro b/tests/auto/sql/models/qsqlquerymodel/qsqlquerymodel.pro
index 40ec56d473..7bcde08469 100644
--- a/tests/auto/sql/models/qsqlquerymodel/qsqlquerymodel.pro
+++ b/tests/auto/sql/models/qsqlquerymodel/qsqlquerymodel.pro
@@ -1,4 +1,5 @@
CONFIG += testcase
+CONFIG += parallel_test
TARGET = tst_qsqlquerymodel
SOURCES += tst_qsqlquerymodel.cpp
diff --git a/tests/auto/sql/models/qsqlrelationaltablemodel/qsqlrelationaltablemodel.pro b/tests/auto/sql/models/qsqlrelationaltablemodel/qsqlrelationaltablemodel.pro
index 0d7318a5c9..e0503e1600 100644
--- a/tests/auto/sql/models/qsqlrelationaltablemodel/qsqlrelationaltablemodel.pro
+++ b/tests/auto/sql/models/qsqlrelationaltablemodel/qsqlrelationaltablemodel.pro
@@ -1,4 +1,5 @@
CONFIG += testcase
+CONFIG += parallel_test
TARGET = tst_qsqlrelationaltablemodel
SOURCES += tst_qsqlrelationaltablemodel.cpp
diff --git a/tests/auto/sql/models/qsqltablemodel/qsqltablemodel.pro b/tests/auto/sql/models/qsqltablemodel/qsqltablemodel.pro
index e7d01afb40..211c2f2c2e 100644
--- a/tests/auto/sql/models/qsqltablemodel/qsqltablemodel.pro
+++ b/tests/auto/sql/models/qsqltablemodel/qsqltablemodel.pro
@@ -1,4 +1,5 @@
CONFIG += testcase
+CONFIG += parallel_test
TARGET = tst_qsqltablemodel
SOURCES += tst_qsqltablemodel.cpp