1
1

cmake: Rename WITH_TESTING option to UNIT_TESTING

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Этот коммит содержится в:
Andreas Schneider 2018-06-29 10:29:02 +02:00
родитель f4ddf9df53
Коммит 84ac7d1de0
6 изменённых файлов: 25 добавлений и 25 удалений

Просмотреть файл

@ -7,7 +7,7 @@ variables:
debian/openssl_1.0.x/aarch64:
script:
- mkdir -p obj && cd obj && cmake -DWITH_TESTING=ON -DCMAKE_BUILD_TYPE=Debug
- mkdir -p obj && cd obj && cmake -DUNIT_TESTING=ON -DCMAKE_BUILD_TYPE=Debug
-DWITH_SFTP=ON -DWITH_SERVER=ON -DWITH_ZLIB=ON
-DWITH_PCAP=ON .. && make -j$(nproc) && ctest --output-on-failure
make -j$(nproc) && ctest --output-on-failure
@ -25,7 +25,7 @@ debian/openssl_1.0.x/aarch64:
centos7/openssl_1.0.x/x86-64:
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$CENTOS7_BUILD
script:
- mkdir -p obj && cd obj && cmake -DWITH_TESTING=ON -DCMAKE_BUILD_TYPE=Debug
- mkdir -p obj && cd obj && cmake -DUNIT_TESTING=ON -DCMAKE_BUILD_TYPE=Debug
-DWITH_SFTP=ON -DWITH_SERVER=ON -DWITH_ZLIB=ON
-DWITH_PCAP=ON .. && make -j$(nproc) && ctest --output-on-failure
tags:
@ -41,7 +41,7 @@ centos7/openssl_1.0.x/x86-64:
fedora/openssl_1.1.x/x86-64:
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$FEDORA_BUILD
script:
- mkdir -p obj && cd obj && cmake -DWITH_TESTING=ON -DCMAKE_BUILD_TYPE=Debug
- mkdir -p obj && cd obj && cmake -DUNIT_TESTING=ON -DCMAKE_BUILD_TYPE=Debug
-DWITH_CLIENT_TESTING=ON -DWITH_SFTP=ON -DWITH_SERVER=ON -DWITH_ZLIB=ON
-DWITH_PCAP=ON .. && make -j$(nproc) && ctest --output-on-failure
tags:
@ -60,7 +60,7 @@ fedora/openssl_1.1.x/x86-64:
script:
- export CFLAGS="-fsanitize=address -g -O2"
- export LDFLAGS="-fsanitize=address -static-libasan"
- mkdir -p obj && cd obj && cmake -DWITH_TESTING=ON -DCMAKE_BUILD_TYPE=Debug
- mkdir -p obj && cd obj && cmake -DUNIT_TESTING=ON -DCMAKE_BUILD_TYPE=Debug
-DWITH_CLIENT_TESTING=ON -DWITH_SFTP=ON -DWITH_SERVER=ON -DWITH_ZLIB=ON
-DWITH_PCAP=ON .. && make -j$(nproc) && ctest --output-on-failure
tags:
@ -77,7 +77,7 @@ fedora/undefined-sanitizer:
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$FEDORA_BUILD
script:
- export CFLAGS="-fsanitize=undefined -fsanitize=null -fsanitize=alignment -fno-sanitize-recover"
- mkdir -p obj && cd obj && cmake -DWITH_TESTING=ON -DCMAKE_BUILD_TYPE=Debug
- mkdir -p obj && cd obj && cmake -DUNIT_TESTING=ON -DCMAKE_BUILD_TYPE=Debug
-DWITH_CLIENT_TESTING=ON -DWITH_SFTP=ON -DWITH_SERVER=ON -DWITH_ZLIB=ON
-DWITH_PCAP=ON .. && make -j$(nproc) && ctest --output-on-failure
tags:
@ -95,7 +95,7 @@ fedora/static-analysis:
script:
- export CCC_CC=clang
- export CCC_CXX=clang++
- mkdir -p obj && cd obj && scan-build cmake -DWITH_TESTING=ON -DCMAKE_BUILD_TYPE=Debug
- mkdir -p obj && cd obj && scan-build cmake -DUNIT_TESTING=ON -DCMAKE_BUILD_TYPE=Debug
-DWITH_CLIENT_TESTING=ON -DWITH_SFTP=ON -DWITH_SERVER=ON -DWITH_ZLIB=ON
-DWITH_PCAP=ON -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang .. &&
scan-build --status-bugs -o scan make -j$(nproc)
@ -114,7 +114,7 @@ fedora/static-analysis:
freebsd/x86-64:
image:
script:
- mkdir -p obj && cd obj && cmake -DWITH_TESTING=ON -DCMAKE_BUILD_TYPE=Debug
- mkdir -p obj && cd obj && cmake -DUNIT_TESTING=ON -DCMAKE_BUILD_TYPE=Debug
-DWITH_SFTP=ON -DWITH_SERVER=ON -DWITH_ZLIB=ON
-DWITH_PCAP=ON .. && make && ctest --output-on-failure
make -j$(nproc) && ctest --output-on-failure
@ -131,7 +131,7 @@ freebsd/x86-64:
fedora/libgcrypt/x86-64:
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$FEDORA_BUILD
script:
- mkdir -p obj && cd obj && cmake -DWITH_TESTING=ON -DCMAKE_BUILD_TYPE=Debug -DWITH_GCRYPT=ON
- mkdir -p obj && cd obj && cmake -DUNIT_TESTING=ON -DCMAKE_BUILD_TYPE=Debug -DWITH_GCRYPT=ON
-DWITH_CLIENT_TESTING=ON -DWITH_SFTP=ON -DWITH_SERVER=ON -DWITH_ZLIB=ON
-DWITH_PCAP=ON .. && make -j$(nproc) && ctest --output-on-failure
tags:
@ -147,7 +147,7 @@ fedora/libgcrypt/x86-64:
fedora/mbedtls/x86-64:
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$FEDORA_BUILD
script:
- mkdir -p obj && cd obj && cmake -DWITH_TESTING=ON -DCMAKE_BUILD_TYPE=Debug -DWITH_MBEDTLS=ON
- mkdir -p obj && cd obj && cmake -DUNIT_TESTING=ON -DCMAKE_BUILD_TYPE=Debug -DWITH_MBEDTLS=ON
-DWITH_CLIENT_TESTING=ON -DWITH_SFTP=ON -DWITH_SERVER=ON -DWITH_ZLIB=ON
-DWITH_PCAP=ON .. && make -j$(nproc) && ctest --output-on-failure
tags:
@ -163,7 +163,7 @@ fedora/mbedtls/x86-64:
tumbleweed/openssl_1.1.x/x86-64:
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$TUMBLEWEED_BUILD
script:
- mkdir -p obj && cd obj && cmake -DWITH_TESTING=ON -DCMAKE_BUILD_TYPE=Debug
- mkdir -p obj && cd obj && cmake -DUNIT_TESTING=ON -DCMAKE_BUILD_TYPE=Debug
-DWITH_CLIENT_TESTING=ON -DWITH_SFTP=ON -DWITH_SERVER=ON -DWITH_ZLIB=ON
-DWITH_PCAP=ON .. && make -j$(nproc) && ctest --output-on-failure
tags:
@ -180,7 +180,7 @@ tumbleweed/undefined-sanitizer:
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$TUMBLEWEED_BUILD
script:
- export CFLAGS="-fsanitize=undefined -fsanitize=null -fsanitize=alignment -fno-sanitize-recover"
- mkdir -p obj && cd obj && cmake -DWITH_TESTING=ON -DCMAKE_BUILD_TYPE=Debug
- mkdir -p obj && cd obj && cmake -DUNIT_TESTING=ON -DCMAKE_BUILD_TYPE=Debug
-DWITH_CLIENT_TESTING=ON -DWITH_SFTP=ON -DWITH_SERVER=ON -DWITH_ZLIB=ON
-DWITH_PCAP=ON .. && make -j$(nproc) && ctest --output-on-failure
tags:
@ -198,7 +198,7 @@ tumbleweed/static-analysis:
script:
- export CCC_CC=clang
- export CCC_CXX=clang++
- mkdir -p obj && cd obj && scan-build cmake -DWITH_TESTING=ON -DCMAKE_BUILD_TYPE=Debug
- mkdir -p obj && cd obj && scan-build cmake -DUNIT_TESTING=ON -DCMAKE_BUILD_TYPE=Debug
-DWITH_CLIENT_TESTING=ON -DWITH_SFTP=ON -DWITH_SERVER=ON -DWITH_ZLIB=ON
-DWITH_PCAP=ON -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang .. &&
scan-build --status-bugs -o scan make -j$(nproc)
@ -221,7 +221,7 @@ mingw64:
- export DISPLAY=:1
- mkdir -p obj && cd obj && mingw64-cmake -DCMAKE_BUILD_TYPE=Debug
-DWITH_SFTP=ON -DWITH_SERVER=ON -DWITH_ZLIB=ON
-DWITH_PCAP=ON -DWITH_TESTING=ON .. && make -j$(nproc)
-DWITH_PCAP=ON -DUNIT_TESTING=ON .. && make -j$(nproc)
- export WINEPATH=/usr/x86_64-w64-mingw32/sys-root/mingw/bin
- ctest --output-on-failure
tags:
@ -243,7 +243,7 @@ mingw32:
- export DISPLAY=:1
- mkdir -p obj && cd obj && mingw32-cmake -DCMAKE_BUILD_TYPE=Debug
-DWITH_SFTP=ON -DWITH_SERVER=ON -DWITH_ZLIB=ON
-DWITH_PCAP=ON -DWITH_TESTING=ON .. && make -j$(nproc)
-DWITH_PCAP=ON -DUNIT_TESTING=ON .. && make -j$(nproc)
- export WINEPATH=/usr/i686-w64-mingw32/sys-root/mingw/bin
- ctest --output-on-failure
tags:

Просмотреть файл

@ -146,11 +146,11 @@ if (WITH_EXAMPLES)
add_subdirectory(examples)
endif (WITH_EXAMPLES)
if (WITH_TESTING)
if (UNIT_TESTING)
find_package(CMocka REQUIRED)
include(AddCMockaTest)
add_subdirectory(tests)
endif (WITH_TESTING)
endif (UNIT_TESTING)
message(STATUS "********************************************")
@ -166,7 +166,7 @@ message(STATUS "Server support : ${WITH_SERVER}")
message(STATUS "GSSAPI support : ${WITH_GSSAPI}")
message(STATUS "Pcap debugging support : ${WITH_PCAP}")
message(STATUS "With static library: ${WITH_STATIC_LIB}")
message(STATUS "Unit testing: ${WITH_TESTING}")
message(STATUS "Unit testing: ${UNIT_TESTING}")
message(STATUS "Client code Unit testing: ${WITH_CLIENT_TESTING}")
if (WITH_INTERNAL_DOC)
message(STATUS "Internal documentation generation")

Просмотреть файл

@ -11,7 +11,7 @@ option(WITH_GCRYPT "Compile against libgcrypt" OFF)
option(WITH_MBEDTLS "Compile against libmbedtls" OFF)
option(WITH_PCAP "Compile with Pcap generation support" ON)
option(WITH_INTERNAL_DOC "Compile doxygen internal documentation" OFF)
option(WITH_TESTING "Build with unit tests" OFF)
option(UNIT_TESTING "Build with unit tests" OFF)
option(WITH_CLIENT_TESTING "Build with client tests; requires a running sshd" OFF)
option(WITH_BENCHMARKS "Build benchmarks tools" OFF)
option(WITH_EXAMPLES "Build examples" ON)
@ -24,12 +24,12 @@ else (WITH_ZLIB)
endif (WITH_ZLIB)
if(WITH_BENCHMARKS)
set(WITH_TESTING ON)
set(UNIT_TESTING ON)
endif(WITH_BENCHMARKS)
if (WITH_TESTING)
if (UNIT_TESTING)
set(WITH_STATIC_LIB ON)
endif (WITH_TESTING)
endif (UNIT_TESTING)
if (WITH_NACL)
set(WITH_NACL ON)

Просмотреть файл

@ -31,7 +31,7 @@ First, you need to configure the compilation, using CMake. Go inside the
GNU/Linux, MacOS X, MSYS/MinGW:
cmake -DWITH_TESTING=ON -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Debug ..
cmake -DUNIT_TESTING=ON -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Debug ..
make
On Windows you should choose a makefile gernerator with -G or use

Просмотреть файл

@ -137,7 +137,7 @@ while test -n "$1"; do
OPTIONS="${OPTIONS} -DWITH_STATIC_LIB=ON"
;;
*-unittesting)
OPTIONS="${OPTIONS} -DWITH_TESTING=ON"
OPTIONS="${OPTIONS} -DUNIT_TESTING=ON"
;;
*-clientunittesting)
OPTIONS="${OPTIONS} -DWITH_CLIENT_TESTING=ON"

Просмотреть файл

@ -13,7 +13,7 @@ set(CTEST_CMAKE_GENERATOR "Unix Makefiles")
set(CTEST_BUILD_CONFIGURATION "Debug")
## The build options for the project
set(CTEST_BUILD_OPTIONS "-DWITH_TESTING=ON -DWITH_SSH1=ON -WITH_SFTP=ON -DWITH_SERVER=ON -DWITH_ZLIB=ON -DWITH_PCAP=ON -DDEBUG_CRYPTO=ON -DWITH_GCRYPT=OFF")
set(CTEST_BUILD_OPTIONS "-DUNIT_TESTING=ON -DWITH_SSH1=ON -WITH_SFTP=ON -DWITH_SERVER=ON -DWITH_ZLIB=ON -DWITH_PCAP=ON -DDEBUG_CRYPTO=ON -DWITH_GCRYPT=OFF")
#set(CTEST_CUSTOM_MEMCHECK_IGNORE torture_rand)
@ -51,7 +51,7 @@ endif()
set(CTEST_UPDATE_COMMAND "${CTEST_GIT_COMMAND}")
set(CTEST_CONFIGURE_COMMAND "${CMAKE_COMMAND} -DCMAKE_BUILD_TYPE:STRING=${CTEST_BUILD_CONFIGURATION}")
set(CTEST_CONFIGURE_COMMAND "${CTEST_CONFIGURE_COMMAND} -DWITH_TESTING:BOOL=ON ${CTEST_BUILD_OPTIONS}")
set(CTEST_CONFIGURE_COMMAND "${CTEST_CONFIGURE_COMMAND} -DUNIT_TESTING:BOOL=ON ${CTEST_BUILD_OPTIONS}")
set(CTEST_CONFIGURE_COMMAND "${CTEST_CONFIGURE_COMMAND} \"-G${CTEST_CMAKE_GENERATOR}\"")
set(CTEST_CONFIGURE_COMMAND "${CTEST_CONFIGURE_COMMAND} \"${CTEST_SOURCE_DIRECTORY}\"")