From dcdef2d460ae3fff2d36fabaf543dd243f6558be Mon Sep 17 00:00:00 2001 From: Jeremy Lainé Date: Thu, 17 Jan 2019 07:55:19 +0100 Subject: [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. --- tests/CMakeLists.txt | 9 ++++++--- tests/travis/build-and-test | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'tests') 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 -- cgit v1.2.3