Disable comm tests per default

comm tests require a serial device for testing. If the test environment
isn't available the tests will return errors therefore the tests are
now disabled per default. They can be (re-)enabled by using the cmake
option BUILD_COMM_TESTS.
This commit is contained in:
Bernhard Miklautz 2016-05-02 16:59:25 +02:00
parent bd7ed27f92
commit 81d30cc480
2 changed files with 3 additions and 2 deletions

View File

@ -57,6 +57,7 @@ option(WITH_SMARTCARD_INSPECT "Enable SmartCard API Inspector" OFF)
option(BUILD_TESTING "Build unit tests" OFF)
CMAKE_DEPENDENT_OPTION(TESTS_WTSAPI_EXTRA "Build extra WTSAPI tests (interactive)" OFF "BUILD_TESTING" OFF)
CMAKE_DEPENDENT_OPTION(BUILD_COMM_TESTS "Build comm related tests (require comm port)" OFF "BUILD_TESTING" OFF)
option(WITH_SAMPLE "Build sample code" OFF)

View File

@ -34,7 +34,7 @@ if(UNIX AND NOT WIN32 AND NOT APPLE)
winpr_module_add(${${MODULE_PREFIX}_SRCS})
if(BUILD_TESTING)
if(BUILD_TESTING AND BUILD_COMM_TESTS)
add_subdirectory(test)
endif()
endif()