diff --git a/CMakeLists.txt b/CMakeLists.txt index edde0c49f..fe1a72916 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,6 +25,7 @@ add_compile_options(-Wall -Wextra -Wpedantic -Wconversion -Wno-sign-conversion - option(BUILD_SHARED_LIBS "build shared library" ON) option(PISTACHE_BUILD_TESTS "build tests alongside the project" OFF) +option(PISTACHE_ENABLE_FLAKY_TESTS "if tests are built, also run ones that are known to be flaky" ON) option(PISTACHE_ENABLE_NETWORK_TESTS "if tests are built, run ones needing network access" ON) option(PISTACHE_USE_SSL "add support for SSL server" OFF) option(PISTACHE_PIC "Enable pistache PIC" ON) diff --git a/README.md b/README.md index 785721303..f093490f1 100644 --- a/README.md +++ b/README.md @@ -221,6 +221,7 @@ Some other Meson options: | ----------------------------- | ------- | ---------------------------------------------- | | PISTACHE_USE_SSL | False | Build server with SSL support | | PISTACHE_BUILD_TESTS | False | Build all of the unit tests | +| PISTACHE_ENABLE_FLAKY_TESTS | True | Run unit tests that are known to be flaky | | PISTACHE_ENABLE_NETWORK_TESTS | True | Run unit tests requiring remote network access | | PISTACHE_BUILD_EXAMPLES | False | Build all of the example apps | | PISTACHE_BUILD_DOCS | False | Build Doxygen docs | diff --git a/meson_options.txt b/meson_options.txt index f5ee79c76..c0ed5a538 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -3,6 +3,7 @@ # SPDX-License-Identifier: Apache-2.0 option('PISTACHE_BUILD_TESTS', type: 'boolean', value: false, description: 'build tests alongside the project') +option('PISTACHE_ENABLE_FLAKY_TESTS', type: 'boolean', value: true, description: 'if tests are built, run ones that are known to be flaky') option('PISTACHE_ENABLE_NETWORK_TESTS', type: 'boolean', value: true, description: 'if tests are built, run ones needing network access') option('PISTACHE_BUILD_EXAMPLES', type: 'boolean', value: false, description: 'build examples alongside the project') option('PISTACHE_BUILD_DOCS', type: 'boolean', value: false, description: 'build docs alongside the project') diff --git a/tests/meson.build b/tests/meson.build index 2f82c594d..8dad46078 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -22,9 +22,7 @@ pistache_test_files = [ 'http_client_test', 'listener_test', 'request_size_test', - 'streaming_test', 'rest_server_test', - 'rest_swagger_server_test', 'mailbox_test', 'stream_test', 'reactor_test', @@ -35,6 +33,12 @@ pistache_test_files = [ if get_option('PISTACHE_ENABLE_NETWORK_TESTS') pistache_test_files += 'net_test' endif + +if get_option('PISTACHE_ENABLE_FLAKY_TESTS') + pistache_test_files += 'streaming_test' + pistache_test_files += 'rest_swagger_server_test' +endif + if get_option('PISTACHE_USE_SSL') pistache_test_files += 'https_server_test' subdir('certs') diff --git a/version.txt b/version.txt index adebe0a4b..335e40cd1 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -0.0.3.20220225 +0.0.3.20220418