diff options
| author | Don <don.j.olmstead@gmail.com> | 2018-03-21 11:33:38 -0700 |
|---|---|---|
| committer | Don <don.j.olmstead@gmail.com> | 2018-03-21 11:33:38 -0700 |
| commit | 4d753badc09cca1a85c4fb7f404bae2d6ed51f5f (patch) | |
| tree | f733fb88780823f3f9e6b119bcf3648cf90a7f02 | |
| parent | a1c22d93cdb0dab8f1df470d6c05fda239b9054e (diff) | |
| download | portable-4d753badc09cca1a85c4fb7f404bae2d6ed51f5f.tar.gz portable-4d753badc09cca1a85c4fb7f404bae2d6ed51f5f.tar.bz2 portable-4d753badc09cca1a85c4fb7f404bae2d6ed51f5f.zip | |
Cleanup options around tests
| -rw-r--r-- | CMakeLists.txt | 5 | ||||
| -rw-r--r-- | README.md | 4 | ||||
| -rw-r--r-- | appveyor.yml | 10 | ||||
| -rw-r--r-- | tests/CMakeLists.txt | 11 |
4 files changed, 7 insertions, 23 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index b708f07..2873f12 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt | |||
| @@ -29,10 +29,10 @@ string(REGEX REPLACE "\\..*" "" TLS_MAJOR_VERSION ${TLS_VERSION}) | |||
| 29 | 29 | ||
| 30 | option(LIBRESSL_SKIP_INSTALL "Skip installation" ${LIBRESSL_SKIP_INSTALL}) | 30 | option(LIBRESSL_SKIP_INSTALL "Skip installation" ${LIBRESSL_SKIP_INSTALL}) |
| 31 | option(LIBRESSL_APPS "Build apps" ON) | 31 | option(LIBRESSL_APPS "Build apps" ON) |
| 32 | option(LIBRESSL_TESTS "Build tests" ON) | ||
| 32 | option(ENABLE_ASM "Enable assembly" ON) | 33 | option(ENABLE_ASM "Enable assembly" ON) |
| 33 | option(ENABLE_EXTRATESTS "Enable extra tests that may be unreliable on some platforms" OFF) | 34 | option(ENABLE_EXTRATESTS "Enable extra tests that may be unreliable on some platforms" OFF) |
| 34 | option(ENABLE_NC "Enable installing TLS-enabled nc(1)" OFF) | 35 | option(ENABLE_NC "Enable installing TLS-enabled nc(1)" OFF) |
| 35 | option(ENABLE_VSTEST "Enable test on Visual Studio" OFF) | ||
| 36 | set(OPENSSLDIR ${OPENSSLDIR} CACHE PATH "Set the default openssl directory" FORCE) | 36 | set(OPENSSLDIR ${OPENSSLDIR} CACHE PATH "Set the default openssl directory" FORCE) |
| 37 | 37 | ||
| 38 | if(NOT LIBRESSL_SKIP_INSTALL) | 38 | if(NOT LIBRESSL_SKIP_INSTALL) |
| @@ -300,7 +300,8 @@ add_subdirectory(include) | |||
| 300 | if(NOT MSVC) | 300 | if(NOT MSVC) |
| 301 | add_subdirectory(man) | 301 | add_subdirectory(man) |
| 302 | endif() | 302 | endif() |
| 303 | if(NOT MSVC OR ENABLE_VSTEST) | 303 | # Tests require the openssl executable and are unavailable when building shared libraries |
| 304 | if(LIBRESSL_APPS AND LIBRESSL_TESTS AND NOT BUILD_SHARED_LIBS) | ||
| 304 | add_subdirectory(tests) | 305 | add_subdirectory(tests) |
| 305 | endif() | 306 | endif() |
| 306 | 307 | ||
| @@ -143,9 +143,11 @@ into other projects or build by itself. | |||
| 143 | | Option Name | Default | Description | 143 | | Option Name | Default | Description |
| 144 | | ------------ | -----: | ------ | 144 | | ------------ | -----: | ------ |
| 145 | | LIBRESSL_SKIP_INSTALL | OFF | allows skipping install() rules. Can be specified from command line using <br>```-DLIBRESSL_SKIP_INSTALL=ON``` | | 145 | | LIBRESSL_SKIP_INSTALL | OFF | allows skipping install() rules. Can be specified from command line using <br>```-DLIBRESSL_SKIP_INSTALL=ON``` | |
| 146 | | LIBRESSL_APPS | ON | allows skipping application builds. Apps are required to run tests | | ||
| 147 | | LIBRESSL_TESTS | ON | allows skipping of tests. Tests are only available in static builds | | ||
| 148 | | BUILD_SHARED_LIBS | OFF | CMake option for building shared libraries. | | ||
| 146 | | ENABLE_ASM | ON | builds assembly optimized rules. | | 149 | | ENABLE_ASM | ON | builds assembly optimized rules. | |
| 147 | | ENABLE_EXTRATESTS | OFF | Enable extra tests that may be unreliable on some platforms | | 150 | | ENABLE_EXTRATESTS | OFF | Enable extra tests that may be unreliable on some platforms | |
| 148 | | ENABLE_NC | OFF | Enable installing TLS-enabled nc(1) | | 151 | | ENABLE_NC | OFF | Enable installing TLS-enabled nc(1) | |
| 149 | | ENABLE_VSTEST | OFF | Enable test on Visual Studio | | ||
| 150 | | OPENSSLDIR | Blank | Set the default openssl directory. Can be specified from command line using <br>```-DOPENSSLDIR=<dirname>``` | | 152 | | OPENSSLDIR | Blank | Set the default openssl directory. Can be specified from command line using <br>```-DOPENSSLDIR=<dirname>``` | |
| 151 | 153 | ||
diff --git a/appveyor.yml b/appveyor.yml index 6384108..eb5679b 100644 --- a/appveyor.yml +++ b/appveyor.yml | |||
| @@ -6,37 +6,29 @@ environment: | |||
| 6 | - GENERATOR: Visual Studio 14 2015 | 6 | - GENERATOR: Visual Studio 14 2015 |
| 7 | CONFIG: Release | 7 | CONFIG: Release |
| 8 | SHARED_LIBS: ON | 8 | SHARED_LIBS: ON |
| 9 | VSTEST: OFF | ||
| 10 | - GENERATOR: Visual Studio 14 2015 | 9 | - GENERATOR: Visual Studio 14 2015 |
| 11 | CONFIG: Release | 10 | CONFIG: Release |
| 12 | SHARED_LIBS: OFF | 11 | SHARED_LIBS: OFF |
| 13 | VSTEST: ON | ||
| 14 | - GENERATOR: Visual Studio 14 2015 | 12 | - GENERATOR: Visual Studio 14 2015 |
| 15 | CONFIG: Debug | 13 | CONFIG: Debug |
| 16 | SHARED_LIBS: ON | 14 | SHARED_LIBS: ON |
| 17 | VSTEST: OFF | ||
| 18 | - GENERATOR: Visual Studio 14 2015 | 15 | - GENERATOR: Visual Studio 14 2015 |
| 19 | CONFIG: Debug | 16 | CONFIG: Debug |
| 20 | SHARED_LIBS: OFF | 17 | SHARED_LIBS: OFF |
| 21 | VSTEST: ON | ||
| 22 | 18 | ||
| 23 | # x64 builds | 19 | # x64 builds |
| 24 | - GENERATOR: Visual Studio 14 2015 Win64 | 20 | - GENERATOR: Visual Studio 14 2015 Win64 |
| 25 | CONFIG: Release | 21 | CONFIG: Release |
| 26 | SHARED_LIBS: ON | 22 | SHARED_LIBS: ON |
| 27 | VSTEST: OFF | ||
| 28 | - GENERATOR: Visual Studio 14 2015 Win64 | 23 | - GENERATOR: Visual Studio 14 2015 Win64 |
| 29 | CONFIG: Release | 24 | CONFIG: Release |
| 30 | SHARED_LIBS: OFF | 25 | SHARED_LIBS: OFF |
| 31 | VSTEST: ON | ||
| 32 | - GENERATOR: Visual Studio 14 2015 Win64 | 26 | - GENERATOR: Visual Studio 14 2015 Win64 |
| 33 | CONFIG: Debug | 27 | CONFIG: Debug |
| 34 | SHARED_LIBS: ON | 28 | SHARED_LIBS: ON |
| 35 | VSTEST: OFF | ||
| 36 | - GENERATOR: Visual Studio 14 2015 Win64 | 29 | - GENERATOR: Visual Studio 14 2015 Win64 |
| 37 | CONFIG: Debug | 30 | CONFIG: Debug |
| 38 | SHARED_LIBS: OFF | 31 | SHARED_LIBS: OFF |
| 39 | VSTEST: ON | ||
| 40 | 32 | ||
| 41 | init: | 33 | init: |
| 42 | # update mysy2 | 34 | # update mysy2 |
| @@ -49,7 +41,7 @@ before_build: | |||
| 49 | - bash autogen.sh | 41 | - bash autogen.sh |
| 50 | - mkdir build | 42 | - mkdir build |
| 51 | - cd build | 43 | - cd build |
| 52 | - cmake .. -G "%GENERATOR%" -DBUILD_SHARED_LIBS=%SHARED_LIBS% -DENABLE_VSTEST=%VSTEST% | 44 | - cmake .. -G "%GENERATOR%" -DBUILD_SHARED_LIBS=%SHARED_LIBS% |
| 53 | 45 | ||
| 54 | build_script: | 46 | build_script: |
| 55 | - cmake --build . --config %CONFIG% | 47 | - cmake --build . --config %CONFIG% |
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index b669360..69c0d51 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt | |||
| @@ -427,14 +427,3 @@ add_test(verifytest verifytest) | |||
| 427 | add_executable(x25519test x25519test.c) | 427 | add_executable(x25519test x25519test.c) |
| 428 | target_link_libraries(x25519test ${OPENSSL_LIBS}) | 428 | target_link_libraries(x25519test ${OPENSSL_LIBS}) |
| 429 | add_test(x25519test x25519test) | 429 | add_test(x25519test x25519test) |
| 430 | |||
| 431 | if(ENABLE_VSTEST AND BUILD_SHARED_LIBS) | ||
| 432 | add_custom_command(TARGET x25519test POST_BUILD | ||
| 433 | COMMAND "${CMAKE_COMMAND}" -E copy | ||
| 434 | "$<TARGET_FILE:tls>" | ||
| 435 | "$<TARGET_FILE:ssl>" | ||
| 436 | "$<TARGET_FILE:crypto>" | ||
| 437 | "${CMAKE_CURRENT_BINARY_DIR}" | ||
| 438 | COMMENT "Copying DLLs for regression tests") | ||
| 439 | endif() | ||
| 440 | |||
