# Range-reading client of the cache tests. xrdcp reads only whole files, but
# the cache works in blocks. Threads::Threads, as the mode with concurrent
# readers uses std::thread, which needs pthread linked explicitly on glibc
# older than 2.34.
add_executable(xrdpfc-read xrdpfc-read.cc)
target_link_libraries(xrdpfc-read XrdCl XrdUtils Threads::Threads)

add_bats_tests(read.bats)
add_bats_tests(blacklist.bats)
add_bats_tests(checksum.bats)
add_bats_tests(evict.bats)
add_bats_tests(http.bats)
add_bats_tests(prefetch.bats)
add_bats_tests(ossstats.bats)
add_bats_tests(purge.bats)
add_bats_tests(restart.bats)
add_bats_tests(spaces.bats)

# The purge runs each 60 s, and the test must wait for it.
set_tests_properties(end-to-end.cache.purge PROPERTIES TIMEOUT 600 LABELS slow)
set_tests_properties(end-to-end.cache.ossstats PROPERTIES TIMEOUT 600 LABELS slow)
