aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Vrátil <dvratil@kde.org>2016-09-07 15:52:24 (GMT)
committerDaniel Vrátil <dvratil@kde.org>2016-09-07 15:52:39 (GMT)
commit6e246aa9844d5e538824818721fe37129795c09f (patch)
tree28e2caf4201d2d0a0debad7fec2dbcf897ae69d7
parentfc487710a5a2486a58e29832b02334287497e270 (diff)
Enable MySQL and PSQL integration tests by default too
We will now run all integration tests for all supported backends. I removed the "db" tests, which store all payload parts into database and we only run the "fs" tests, which use external payload parts.
-rw-r--r--KF5AkonadiMacros.cmake17
-rw-r--r--autotests/libs/unittestenv/config-mysql-db.xml10
-rw-r--r--autotests/libs/unittestenv/config-postgresql-db.xml10
-rw-r--r--autotests/libs/unittestenv/xdgconfig-mysql.db/akonadi/akonadiserverrc5
-rw-r--r--autotests/libs/unittestenv/xdgconfig-postgresql.db/akonadi/akonadiserverrc9
5 files changed, 6 insertions, 45 deletions
diff --git a/KF5AkonadiMacros.cmake b/KF5AkonadiMacros.cmake
index 11f0782..ebd415a 100644
--- a/KF5AkonadiMacros.cmake
+++ b/KF5AkonadiMacros.cmake
@@ -58,36 +58,31 @@ macro(add_akonadi_isolated_test_advanced _source _additionalsources _linklibrari
endif()
if ( KDEPIMLIBS_TESTS_XML OR AKONADI_TESTS_XML )
- set( MYSQL_EXTRA_OPTIONS_DB -xml -o ${TEST_RESULT_OUTPUT_PATH}/mysql-db-${_name}.xml )
set( MYSQL_EXTRA_OPTIONS_FS -xml -o ${TEST_RESULT_OUTPUT_PATH}/mysql-fs-${_name}.xml )
- set( POSTGRESL_EXTRA_OPTIONS_DB -xml -o ${TEST_RESULT_OUTPUT_PATH}/postgresql-db-${_name}.xml )
set( POSTGRESL_EXTRA_OPTIONS_FS -xml -o ${TEST_RESULT_OUTPUT_PATH}/postgresql-fs-${_name}.xml )
set( SQLITE_EXTRA_OPTIONS -xml -o ${TEST_RESULT_OUTPUT_PATH}/sqlite-${_name}.xml )
endif()
- if ( KDEPIMLIBS_RUN_MYSQL_ISOLATED_TESTS OR AKONADI_RUN_MYSQL_ISOLATED_TESTS )
+ if (NOT KDEPIMLIBS_RUN_MYSQL_ISOLATED_TESTS AND NOT AKONADI_RUN_MYSQL_ISOLATED_TESTS)
find_program( MYSQLD_EXECUTABLE mysqld /usr/sbin /usr/local/sbin /usr/libexec /usr/local/libexec /opt/mysql/libexec /usr/mysql/bin )
if ( MYSQLD_EXECUTABLE )
- add_test( NAME akonadi-mysql-db-${_name} COMMAND ${_testrunner} -c ${CMAKE_CURRENT_SOURCE_DIR}/unittestenv/config-mysql-db.xml ${_executable}
- ${MYSQL_EXTRA_OPTIONS_DB} )
add_test( NAME akonadi-mysql-fs-${_name} COMMAND ${_testrunner} -c ${CMAKE_CURRENT_SOURCE_DIR}/unittestenv/config-mysql-fs.xml ${_executable}
${MYSQL_EXTRA_OPTIONS_FS} )
endif()
endif()
- if ( KDEPIMLIBS_RUN_PGSQL_ISOLATED_TESTS OR AKONADI_RUN_PGSQL_ISOLATED_TESTS )
+ if (NOT KDEPIMLIBS_RUN_PGSQL_ISOLATED_TESTS AND NOT AKONADI_RUN_PGSQL_ISOLATED_TESTS)
find_program( POSTGRES_EXECUTABLE postgres )
if ( POSTGRES_EXECUTABLE )
- add_test( NAME akonadi-postgresql-db-${_name} COMMAND ${_testrunner} -c ${CMAKE_CURRENT_SOURCE_DIR}/unittestenv/config-postgresql-db.xml ${_executable}
- ${POSTGRESL_EXTRA_OPTIONS_DB} )
- add_test( NAME akonadi-postgresql-fs-${_name} COMMAND ${_testrunner} -c ${CMAKE_CURRENT_SOURCE_DIR}/unittestenv/config-postgresql-fs.xml ${_executable}
+ add_test( NAME akonadi-postgresql-fs-${_name} COMMAND ${_testrunner} -c ${CMAKE_CURRENT_SOURCE_DIR}/unittestenv/config-postgresql-fs.xml ${_executable}
${POSTGRESL_EXTRA_OPTIONS_FS} )
endif()
endif()
- # Always have SQLITE tests
- add_test( NAME akonadi-sqlite-${_name} COMMAND ${_testrunner} -c ${CMAKE_CURRENT_SOURCE_DIR}/unittestenv/config-sqlite-db.xml ${_executable}
+ if (NOT KDEPIMLIBS_RUN_SQLITE_ISOLATED_TESTS AND NOT AKONADI_RUN_SQLITE_ISOLATED_TESTS)
+ add_test( NAME akonadi-sqlite-${_name} COMMAND ${_testrunner} -c ${CMAKE_CURRENT_SOURCE_DIR}/unittestenv/config-sqlite-db.xml ${_executable}
${SQLITE_EXTRA_OPTIONS} )
+ endif()
endmacro()
diff --git a/autotests/libs/unittestenv/config-mysql-db.xml b/autotests/libs/unittestenv/config-mysql-db.xml
deleted file mode 100644
index cfdd1eb..0000000
--- a/autotests/libs/unittestenv/config-mysql-db.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-<config>
- <confighome>xdgconfig-mysql.db</confighome>
- <datahome>xdglocal</datahome>
- <agent synchronize="true">akonadi_knut_resource</agent>
- <agent synchronize="true">akonadi_knut_resource</agent>
- <agent synchronize="true">akonadi_knut_resource</agent>
- <envvar name="AKONADI_DISABLE_AGENT_AUTOSTART">true</envvar>
- <envvar name="TESTRUNNER_DB_ENVIRONMENT">mysql</envvar>
- <envvar name="AKONADI_OVERRIDE_SEARCHPLUGIN">testsearchplugin</envvar>
-</config>
diff --git a/autotests/libs/unittestenv/config-postgresql-db.xml b/autotests/libs/unittestenv/config-postgresql-db.xml
deleted file mode 100644
index 436d0b9..0000000
--- a/autotests/libs/unittestenv/config-postgresql-db.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-<config>
- <confighome>xdgconfig-postgresql.db</confighome>
- <datahome>xdglocal</datahome>
- <agent synchronize="true">akonadi_knut_resource</agent>
- <agent synchronize="true">akonadi_knut_resource</agent>
- <agent synchronize="true">akonadi_knut_resource</agent>
- <envvar name="AKONADI_DISABLE_AGENT_AUTOSTART">true</envvar>
- <envvar name="TESTRUNNER_DB_ENVIRONMENT">postgresql</envvar>
- <envvar name="AKONADI_OVERRIDE_SEARCHPLUGIN">testsearchplugin</envvar>
-</config>
diff --git a/autotests/libs/unittestenv/xdgconfig-mysql.db/akonadi/akonadiserverrc b/autotests/libs/unittestenv/xdgconfig-mysql.db/akonadi/akonadiserverrc
deleted file mode 100644
index fa9b2d4..0000000
--- a/autotests/libs/unittestenv/xdgconfig-mysql.db/akonadi/akonadiserverrc
+++ /dev/null
@@ -1,5 +0,0 @@
-[%General]
-ExternalPayload=false
-
-[Search]
-Manager=Dummy
diff --git a/autotests/libs/unittestenv/xdgconfig-postgresql.db/akonadi/akonadiserverrc b/autotests/libs/unittestenv/xdgconfig-postgresql.db/akonadi/akonadiserverrc
deleted file mode 100644
index b2c8b1a..0000000
--- a/autotests/libs/unittestenv/xdgconfig-postgresql.db/akonadi/akonadiserverrc
+++ /dev/null
@@ -1,9 +0,0 @@
-[%General]
-Driver=QPSQL
-ExternalPayload=false
-
-[Search]
-Manager=Dummy
-
-[QPSQL]
-StartServer=true