Skip to content

Commit cefad80

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

File tree

2 files changed

+533
-2
lines changed

2 files changed

+533
-2
lines changed

CMakeLists.txt

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -393,10 +393,10 @@ endif()
393393

394394
option(AUTOTEST "Enable autotests (mainly for CI)" OFF)
395395

396-
function(auto_test target)
396+
function(auto_test_common target extension)
397397
if(AUTOTEST AND NOT (MSVC AND ARGV1 STREQUAL "MSVC_DONT_BUILD"))
398398
add_executable(auto_${target}_test ${CPUFEATURES}
399-
auto_tests/${target}_test.c)
399+
auto_tests/${target}_test.${extension})
400400
target_link_modules(auto_${target}_test toxcore misc_tools)
401401
if(NOT ARGV1 STREQUAL "DONT_RUN")
402402
add_test(NAME ${target} COMMAND ${CROSSCOMPILING_EMULATOR} auto_${target}_test)
@@ -406,6 +406,14 @@ function(auto_test target)
406406
endif()
407407
endfunction()
408408

409+
function(auto_test target)
410+
auto_test_common(${target} "c" ${ARGN})
411+
endfunction()
412+
413+
function(auto_test_cc target)
414+
auto_test_common(${target} "cc" ${ARGN})
415+
endfunction()
416+
409417
auto_test(TCP)
410418
auto_test(conference)
411419
auto_test(conference_double_invite)
@@ -454,6 +462,7 @@ if(BUILD_TOXAV)
454462
auto_test(conference_av)
455463
auto_test(toxav_basic)
456464
auto_test(toxav_many)
465+
auto_test_cc(toxav_mt)
457466
endif()
458467

459468
################################################################################

0 commit comments

Comments
 (0)