jql: 8.0.0 -> 8.0.2 (#362884)
[NixPkgs.git] / pkgs / servers / foundationdb / patches / don-t-run-tests-requiring-doctest.patch
blob702245bd52ff00c229c0708acbecd3b9466281f2
1 From 10c502fd36df24f1fdbdeff446982ff5247ba20e Mon Sep 17 00:00:00 2001
2 From: Jente Hidskes Ankarberg <jente@griffin.sh>
3 Date: Thu, 9 Feb 2023 12:40:21 +0100
4 Subject: [PATCH] Don't run tests requiring doctest
6 Doctest is unconditionally pulled in as an external project, which we can't do
7 ---
8 bindings/c/CMakeLists.txt | 59 ---------------------------------------
9 1 file changed, 59 deletions(-)
11 diff --git bindings/c/CMakeLists.txt bindings/c/CMakeLists.txt
12 index b1a187b99..25b626819 100644
13 --- a/bindings/c/CMakeLists.txt
14 +++ b/bindings/c/CMakeLists.txt
15 @@ -84,7 +84,6 @@ if(NOT WIN32)
16 test/mako/mako.h
17 test/mako/utils.c
18 test/mako/utils.h)
19 - add_subdirectory(test/unit/third_party)
20 find_package(Threads REQUIRED)
21 set(UNIT_TEST_SRCS
22 test/unit/unit_tests.cpp
23 @@ -93,10 +92,6 @@ if(NOT WIN32)
25 set(UNIT_TEST_VERSION_510_SRCS test/unit/unit_tests_version_510.cpp)
26 set(TRACE_PARTIAL_FILE_SUFFIX_TEST_SRCS test/unit/trace_partial_file_suffix_test.cpp)
27 - set(DISCONNECTED_TIMEOUT_UNIT_TEST_SRCS
28 - test/unit/disconnected_timeout_tests.cpp
29 - test/unit/fdb_api.cpp
30 - test/unit/fdb_api.hpp)
32 set(API_TESTER_SRCS
33 test/apitester/fdb_c_api_tester.cpp
34 @@ -128,11 +123,7 @@ if(NOT WIN32)
35 add_library(fdb_c_txn_size_test OBJECT test/txn_size_test.c test/test.h)
36 add_library(fdb_c_client_memory_test OBJECT test/client_memory_test.cpp test/unit/fdb_api.cpp test/unit/fdb_api.hpp)
37 add_library(mako OBJECT ${MAKO_SRCS})
38 - add_library(fdb_c_setup_tests OBJECT test/unit/setup_tests.cpp)
39 - add_library(fdb_c_unit_tests OBJECT ${UNIT_TEST_SRCS})
40 - add_library(fdb_c_unit_tests_version_510 OBJECT ${UNIT_TEST_VERSION_510_SRCS})
41 add_library(trace_partial_file_suffix_test OBJECT ${TRACE_PARTIAL_FILE_SUFFIX_TEST_SRCS})
42 - add_library(disconnected_timeout_unit_tests OBJECT ${DISCONNECTED_TIMEOUT_UNIT_TEST_SRCS})
43 add_library(fdb_c_api_tester OBJECT ${API_TESTER_SRCS})
44 else()
45 add_executable(fdb_c_performance_test test/performance_test.c test/test.h)
46 @@ -140,11 +131,7 @@ if(NOT WIN32)
47 add_executable(fdb_c_txn_size_test test/txn_size_test.c test/test.h)
48 add_executable(fdb_c_client_memory_test test/client_memory_test.cpp test/unit/fdb_api.cpp test/unit/fdb_api.hpp)
49 add_executable(mako ${MAKO_SRCS})
50 - add_executable(fdb_c_setup_tests test/unit/setup_tests.cpp)
51 - add_executable(fdb_c_unit_tests ${UNIT_TEST_SRCS})
52 - add_executable(fdb_c_unit_tests_version_510 ${UNIT_TEST_VERSION_510_SRCS})
53 add_executable(trace_partial_file_suffix_test ${TRACE_PARTIAL_FILE_SUFFIX_TEST_SRCS})
54 - add_executable(disconnected_timeout_unit_tests ${DISCONNECTED_TIMEOUT_UNIT_TEST_SRCS})
55 add_executable(fdb_c_api_tester ${API_TESTER_SRCS})
56 strip_debug_symbols(fdb_c_performance_test)
57 strip_debug_symbols(fdb_c_ryw_benchmark)
58 @@ -155,20 +142,7 @@ if(NOT WIN32)
59 target_link_libraries(fdb_c_ryw_benchmark PRIVATE fdb_c Threads::Threads)
60 target_link_libraries(fdb_c_txn_size_test PRIVATE fdb_c Threads::Threads)
61 target_link_libraries(fdb_c_client_memory_test PRIVATE fdb_c Threads::Threads)
63 - add_dependencies(fdb_c_setup_tests doctest)
64 - add_dependencies(fdb_c_unit_tests doctest)
65 - add_dependencies(fdb_c_unit_tests_version_510 doctest)
66 - add_dependencies(disconnected_timeout_unit_tests doctest)
67 - target_include_directories(fdb_c_setup_tests PUBLIC ${DOCTEST_INCLUDE_DIR})
68 - target_include_directories(fdb_c_unit_tests PUBLIC ${DOCTEST_INCLUDE_DIR})
69 - target_include_directories(fdb_c_unit_tests_version_510 PUBLIC ${DOCTEST_INCLUDE_DIR})
70 - target_include_directories(disconnected_timeout_unit_tests PUBLIC ${DOCTEST_INCLUDE_DIR})
71 - target_link_libraries(fdb_c_setup_tests PRIVATE fdb_c Threads::Threads)
72 - target_link_libraries(fdb_c_unit_tests PRIVATE fdb_c Threads::Threads fdbclient)
73 - target_link_libraries(fdb_c_unit_tests_version_510 PRIVATE fdb_c Threads::Threads)
74 target_link_libraries(trace_partial_file_suffix_test PRIVATE fdb_c Threads::Threads flow)
75 - target_link_libraries(disconnected_timeout_unit_tests PRIVATE fdb_c Threads::Threads)
77 if(USE_SANITIZER)
78 target_link_libraries(fdb_c_api_tester PRIVATE fdb_c toml11_target Threads::Threads fmt::fmt boost_asan)
79 @@ -203,46 +177,13 @@ endif()
80 DEPENDS fdb_c
81 COMMENT "Copy libfdb_c to use as external client for test")
82 add_custom_target(external_client DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/libfdb_c_external.so)
83 - add_dependencies(fdb_c_unit_tests external_client)
84 - add_dependencies(disconnected_timeout_unit_tests external_client)
85 add_dependencies(fdb_c_api_tester external_client)
87 - add_fdbclient_test(
88 - NAME fdb_c_setup_tests
89 - COMMAND $<TARGET_FILE:fdb_c_setup_tests>)
90 - add_fdbclient_test(
91 - NAME fdb_c_unit_tests
92 - COMMAND $<TARGET_FILE:fdb_c_unit_tests>
93 - @CLUSTER_FILE@
94 - fdb)
95 - add_fdbclient_test(
96 - NAME fdb_c_unit_tests_version_510
97 - COMMAND $<TARGET_FILE:fdb_c_unit_tests_version_510>
98 - @CLUSTER_FILE@
99 - fdb)
100 add_fdbclient_test(
101 NAME trace_partial_file_suffix_test
102 COMMAND $<TARGET_FILE:trace_partial_file_suffix_test>
103 @CLUSTER_FILE@
104 fdb)
105 - add_fdbclient_test(
106 - NAME fdb_c_external_client_unit_tests
107 - COMMAND $<TARGET_FILE:fdb_c_unit_tests>
108 - @CLUSTER_FILE@
109 - fdb
110 - ${CMAKE_CURRENT_BINARY_DIR}/libfdb_c_external.so
112 - add_unavailable_fdbclient_test(
113 - NAME disconnected_timeout_unit_tests
114 - COMMAND $<TARGET_FILE:disconnected_timeout_unit_tests>
115 - @CLUSTER_FILE@
117 - add_unavailable_fdbclient_test(
118 - NAME disconnected_timeout_external_client_unit_tests
119 - COMMAND $<TARGET_FILE:disconnected_timeout_unit_tests>
120 - @CLUSTER_FILE@
121 - ${CMAKE_CURRENT_BINARY_DIR}/libfdb_c_external.so
123 add_fdbclient_test(
124 NAME fdb_c_api_tests
125 DISABLE_LOG_DUMP
127 2.37.1 (Apple Git-137.1)