2021-08-16 01:45:50 +00:00
|
|
|
add_executable(libtransmission-test
|
2021-12-14 20:59:40 +00:00
|
|
|
announce-list-test.cc
|
2022-01-25 04:25:55 +00:00
|
|
|
announcer-test.cc
|
2022-10-21 18:15:14 +00:00
|
|
|
announcer-udp-test.cc
|
2022-01-28 22:46:14 +00:00
|
|
|
benc-test.cc
|
2021-08-16 01:45:50 +00:00
|
|
|
bitfield-test.cc
|
2021-11-24 14:48:52 +00:00
|
|
|
block-info-test.cc
|
2021-08-16 01:45:50 +00:00
|
|
|
blocklist-test.cc
|
2022-10-19 16:42:08 +00:00
|
|
|
buffer-test.cc
|
2021-08-16 01:45:50 +00:00
|
|
|
clients-test.cc
|
2021-11-25 18:26:51 +00:00
|
|
|
completion-test.cc
|
2021-08-16 01:45:50 +00:00
|
|
|
copy-test.cc
|
|
|
|
crypto-test-ref.h
|
|
|
|
crypto-test.cc
|
|
|
|
error-test.cc
|
2022-11-11 16:09:24 +00:00
|
|
|
dht-test.cc
|
2021-11-29 01:12:54 +00:00
|
|
|
file-piece-map-test.cc
|
2021-12-25 21:21:13 +00:00
|
|
|
file-test.cc
|
2021-08-16 01:45:50 +00:00
|
|
|
getopt-test.cc
|
2022-07-16 20:25:44 +00:00
|
|
|
handshake-test.cc
|
2021-08-16 01:45:50 +00:00
|
|
|
history-test.cc
|
|
|
|
json-test.cc
|
2022-08-24 21:03:30 +00:00
|
|
|
lpd-test.cc
|
2021-11-10 02:42:18 +00:00
|
|
|
magnet-metainfo-test.cc
|
2021-08-16 01:45:50 +00:00
|
|
|
makemeta-test.cc
|
|
|
|
move-test.cc
|
2022-10-14 06:20:39 +00:00
|
|
|
net-test.cc
|
2022-04-29 02:35:47 +00:00
|
|
|
open-files-test.cc
|
2021-11-19 18:37:38 +00:00
|
|
|
peer-mgr-active-requests-test.cc
|
2021-11-24 14:48:52 +00:00
|
|
|
peer-mgr-wishlist-test.cc
|
|
|
|
peer-msgs-test.cc
|
2022-07-23 01:10:02 +00:00
|
|
|
platform-test.cc
|
2021-08-16 01:45:50 +00:00
|
|
|
quark-test.cc
|
2022-04-15 23:39:04 +00:00
|
|
|
remove-test.cc
|
2021-08-16 01:45:50 +00:00
|
|
|
rename-test.cc
|
|
|
|
rpc-test.cc
|
|
|
|
session-test.cc
|
2022-11-02 00:32:26 +00:00
|
|
|
session-alt-speeds-test.cc
|
|
|
|
settings-test.cc
|
2022-03-24 21:41:29 +00:00
|
|
|
strbuf-test.cc
|
2021-08-16 01:45:50 +00:00
|
|
|
subprocess-test-script.cmd
|
|
|
|
subprocess-test.cc
|
|
|
|
test-fixtures.h
|
2022-11-08 22:20:21 +00:00
|
|
|
timer-test.cc
|
2022-05-23 22:53:26 +00:00
|
|
|
torrent-files-test.cc
|
2022-08-28 17:33:58 +00:00
|
|
|
torrent-magnet-test.cc
|
2021-12-25 21:21:13 +00:00
|
|
|
torrent-metainfo-test.cc
|
2022-03-01 23:06:29 +00:00
|
|
|
torrents-test.cc
|
2021-08-16 01:45:50 +00:00
|
|
|
utils-test.cc
|
|
|
|
variant-test.cc
|
2021-11-09 03:30:03 +00:00
|
|
|
watchdir-test.cc
|
|
|
|
web-utils-test.cc)
|
2021-08-16 01:45:50 +00:00
|
|
|
|
2022-11-12 20:01:57 +00:00
|
|
|
set_property(TARGET libtransmission-test PROPERTY FOLDER "tests")
|
|
|
|
|
2021-08-16 01:45:50 +00:00
|
|
|
target_compile_definitions(libtransmission-test
|
|
|
|
PRIVATE
|
2021-10-15 18:13:33 +00:00
|
|
|
-DLIBTRANSMISSION_TEST_ASSETS_DIR="${CMAKE_CURRENT_SOURCE_DIR}/assets"
|
2021-08-16 01:45:50 +00:00
|
|
|
__TRANSMISSION__)
|
|
|
|
|
|
|
|
target_include_directories(libtransmission-test
|
|
|
|
PRIVATE
|
|
|
|
${CMAKE_SOURCE_DIR}/libtransmission
|
|
|
|
${CMAKE_BINARY_DIR}/libtransmission)
|
|
|
|
|
|
|
|
target_include_directories(libtransmission-test SYSTEM
|
|
|
|
PRIVATE
|
2022-07-15 00:54:10 +00:00
|
|
|
${WIDE_INTEGER_INCLUDE_DIRS}
|
2022-07-03 13:05:40 +00:00
|
|
|
${B64_INCLUDE_DIRS}
|
2021-08-16 01:45:50 +00:00
|
|
|
${CURL_INCLUDE_DIRS}
|
2022-11-11 16:09:24 +00:00
|
|
|
${DHT_INCLUDE_DIRS}
|
2021-08-16 01:45:50 +00:00
|
|
|
${EVENT2_INCLUDE_DIRS})
|
|
|
|
|
|
|
|
target_compile_options(libtransmission-test
|
|
|
|
PRIVATE
|
|
|
|
$<$<OR:$<CXX_COMPILER_ID:GNU>,$<CXX_COMPILER_ID:Clang>>:-Wno-sign-compare>) # patches welcomed
|
|
|
|
|
|
|
|
target_link_libraries(libtransmission-test
|
|
|
|
PRIVATE
|
|
|
|
${TR_NAME}
|
|
|
|
gtestall)
|
|
|
|
|
|
|
|
add_test(
|
|
|
|
NAME libtransmission-test
|
|
|
|
COMMAND libtransmission-test)
|
2020-08-11 18:11:55 +00:00
|
|
|
|
|
|
|
add_custom_command(
|
2021-08-16 01:45:50 +00:00
|
|
|
TARGET libtransmission-test
|
|
|
|
PRE_BUILD
|
|
|
|
COMMAND
|
|
|
|
${CMAKE_COMMAND} -E copy_if_different
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/subprocess-test-script.cmd
|
|
|
|
$<TARGET_FILE_DIR:libtransmission-test>/subprocess-test.cmd)
|
|
|
|
|
|
|
|
add_executable(subprocess-test
|
|
|
|
subprocess-test-program.cc)
|
|
|
|
|
2022-11-12 20:01:57 +00:00
|
|
|
set_property(TARGET subprocess-test PROPERTY FOLDER "tests")
|
|
|
|
|
2021-08-16 01:45:50 +00:00
|
|
|
target_include_directories(subprocess-test
|
|
|
|
PRIVATE
|
|
|
|
${CMAKE_SOURCE_DIR}/libtransmission)
|
|
|
|
|
|
|
|
target_link_libraries(subprocess-test
|
|
|
|
PRIVATE
|
|
|
|
${TR_NAME})
|
|
|
|
|
|
|
|
add_dependencies(libtransmission-test
|
|
|
|
subprocess-test)
|