Skip to content

Commit 08fc8f2

Browse files
committed
test: add test for multithreaded ToxAV
This tests tox_iterate in a separate thread, and the two ToxAV modes.
1 parent d2bf724 commit 08fc8f2

File tree

2 files changed

+512
-0
lines changed

2 files changed

+512
-0
lines changed

CMakeLists.txt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -406,6 +406,19 @@ function(auto_test target)
406406
endif()
407407
endfunction()
408408

409+
function(auto_test_cc target)
410+
if(AUTOTEST AND NOT (MSVC AND ARGV1 STREQUAL "MSVC_DONT_BUILD"))
411+
add_executable(auto_${target}_test ${CPUFEATURES}
412+
auto_tests/${target}_test.cc)
413+
target_link_modules(auto_${target}_test toxcore misc_tools)
414+
if(NOT ARGV1 STREQUAL "DONT_RUN")
415+
add_test(NAME ${target} COMMAND ${CROSSCOMPILING_EMULATOR} auto_${target}_test)
416+
set_tests_properties(${target} PROPERTIES TIMEOUT "${TEST_TIMEOUT_SECONDS}")
417+
set_property(TEST ${target} PROPERTY ENVIRONMENT "LLVM_PROFILE_FILE=${target}.profraw")
418+
endif()
419+
endif()
420+
endfunction()
421+
409422
auto_test(TCP)
410423
auto_test(conference)
411424
auto_test(conference_double_invite)
@@ -454,6 +467,7 @@ if(BUILD_TOXAV)
454467
auto_test(conference_av)
455468
auto_test(toxav_basic)
456469
auto_test(toxav_many)
470+
auto_test_cc(toxav_mt)
457471
endif()
458472

459473
################################################################################

0 commit comments

Comments
 (0)