aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Lainé <jeremy.laine@m4x.org>2019-01-17 07:55:19 +0100
committerJeremy Lainé <jeremy.laine@m4x.org>2019-01-17 08:43:31 +0100
commitdcdef2d460ae3fff2d36fabaf543dd243f6558be (patch)
tree20c8f1234c2bc3f95ad0b1dea48b0286dde3b8c2
parentc5611635f057f118e686784ec865681baf1cb2e4 (diff)
[tests] add CMake option to build internal tests
Some tests are disabled by default as they require exporting additional symbols which are not part of the public API. The BUILD_INTERNAL_TESTS option makes it possible to enable these additional tests.
-rw-r--r--CMakeLists.txt1
-rw-r--r--tests/CMakeLists.txt9
-rwxr-xr-xtests/travis/build-and-test2
3 files changed, 8 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 786ffaec..a5ddf281 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -19,6 +19,7 @@ set(CMAKE_AUTORCC ON)
include(GNUInstallDirs)
option(BUILD_TESTS "Build tests." ON)
+option(BUILD_INTERNAL_TESTS "Build internal tests." OFF)
option(BUILD_DOCUMENTATION "Build API documentation." OFF)
option(BUILD_EXAMPLES "Build examples." ON)
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 0b64c746..df125219 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -18,7 +18,6 @@ add_simple_test(qxmpparchiveiq)
add_simple_test(qxmppbindiq)
add_simple_test(qxmppcallmanager)
add_simple_test(qxmppcarbonmanager)
-# add_simple_test(qxmppcodec)
add_simple_test(qxmppdataform)
add_simple_test(qxmppdiscoveryiq)
add_simple_test(qxmppentitytimeiq)
@@ -36,17 +35,21 @@ add_simple_test(qxmpprosteriq)
add_simple_test(qxmpprpciq)
add_simple_test(qxmpprtcppacket)
add_simple_test(qxmpprtppacket)
-# add_simple_test(qxmppsasl)
add_simple_test(qxmppserver)
add_simple_test(qxmppsessioniq)
add_simple_test(qxmppsocks)
add_simple_test(qxmppstanza)
add_simple_test(qxmppstreamfeatures)
-# add_simple_test(qxmppstreaminitiationiq)
add_simple_test(qxmppstunmessage)
add_simple_test(qxmppvcardiq)
add_simple_test(qxmppversioniq)
+if(BUILD_INTERNAL_TESTS)
+ add_simple_test(qxmppcodec)
+ add_simple_test(qxmppsasl)
+ add_simple_test(qxmppstreaminitiationiq)
+endif()
+
add_subdirectory(qxmpptransfermanager)
add_subdirectory(qxmpputils)
diff --git a/tests/travis/build-and-test b/tests/travis/build-and-test
index 09000e61..f677f4a8 100755
--- a/tests/travis/build-and-test
+++ b/tests/travis/build-and-test
@@ -11,7 +11,7 @@ esac
case "$CONFIG" in
*debug*)
- CMAKE_ARGS="$CMAKE_ARGS -DCMAKE_BUILD_TYPE:STRING=Debug"
+ CMAKE_ARGS="$CMAKE_ARGS -DCMAKE_BUILD_TYPE:STRING=Debug -DBUILD_INTERNAL_TESTS:BOOL=True"
;;
esac