Skip to content

Commit abbdba4

Browse files
Move unit tests to unit folder
1 parent 5716889 commit abbdba4

6 files changed

Lines changed: 14 additions & 0 deletions

src/tests/CMakeLists.txt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ if(UNIT_TEST_SOURCES)
4040
target_link_libraries(livekit_unit_tests
4141
PRIVATE
4242
livekit
43+
spdlog::spdlog
4344
GTest::gtest_main
4445
GTest::gmock
4546
)
@@ -48,11 +49,23 @@ if(UNIT_TEST_SOURCES)
4849
PRIVATE
4950
${LIVEKIT_ROOT_DIR}/include
5051
${LIVEKIT_ROOT_DIR}/src
52+
${LIVEKIT_BINARY_DIR}/generated
53+
${Protobuf_INCLUDE_DIRS}
5154
)
55+
if(TARGET absl::base)
56+
get_target_property(_livekit_unit_test_absl_inc absl::base INTERFACE_INCLUDE_DIRECTORIES)
57+
if(_livekit_unit_test_absl_inc)
58+
target_include_directories(livekit_unit_tests PRIVATE
59+
${_livekit_unit_test_absl_inc}
60+
)
61+
endif()
62+
endif()
5263

5364
target_compile_definitions(livekit_unit_tests
5465
PRIVATE
5566
LIVEKIT_TEST_ACCESS
67+
LIVEKIT_ROOT_DIR="${LIVEKIT_ROOT_DIR}"
68+
SPDLOG_ACTIVE_LEVEL=${_SPDLOG_ACTIVE_LEVEL}
5669
)
5770

5871
if(WIN32)

src/tests/integration/test_audio_processing_module.cpp renamed to src/tests/unit/test_audio_processing_module.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -801,6 +801,7 @@ TEST_F(AudioProcessingModuleTest, AGCAttenuatesLoudSpeech) {
801801
int sample_rate = 0;
802802
int num_channels = 0;
803803

804+
// TODO: figure out what generates this welcome.wav file such that this test isn't skipped
804805
std::string wav_path = std::string(LIVEKIT_ROOT_DIR) + "/data/welcome.wav";
805806
if (!readWavFile(wav_path, original_samples, sample_rate, num_channels)) {
806807
GTEST_SKIP() << "Could not read " << wav_path;
File renamed without changes.
File renamed without changes.

src/tests/integration/test_subscription_thread_dispatcher.cpp renamed to src/tests/unit/test_subscription_thread_dispatcher.cpp

File renamed without changes.

0 commit comments

Comments
 (0)