diff --git a/CMakeLists.txt b/CMakeLists.txt index c4d6a38d4d..478d3a84c8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1569,173 +1569,6 @@ add_subdirectory( "${CMAKE_CURRENT_BINARY_DIR}/lib/googletest" ) -add_executable(mixxx-test - src/test/analyserwaveformtest.cpp - src/test/analyzersilence_test.cpp - src/test/audiotaperpot_test.cpp - src/test/autodjprocessor_test.cpp - src/test/beatgridtest.cpp - src/test/beatmaptest.cpp - src/test/beatstest.cpp - src/test/beatstranslatetest.cpp - src/test/bpmtest.cpp - src/test/bpmcontrol_test.cpp - src/test/broadcastprofile_test.cpp - src/test/broadcastsettings_test.cpp - src/test/cache_test.cpp - src/test/channelhandle_test.cpp - src/test/colorconfig_test.cpp - src/test/colormapperjsproxy_test.cpp - src/test/colorpalette_test.cpp - src/test/configobject_test.cpp - src/test/controller_mapping_validation_test.cpp - src/test/controllerscriptenginelegacy_test.cpp - src/test/controlobjecttest.cpp - src/test/controlobjectscripttest.cpp - src/test/coreservicestest.cpp - src/test/coverartcache_test.cpp - src/test/coverartutils_test.cpp - src/test/cratestorage_test.cpp - src/test/cue_test.cpp - src/test/cuecontrol_test.cpp - src/test/dbconnectionpool_test.cpp - src/test/dbidtest.cpp - src/test/directorydaotest.cpp - src/test/duration_test.cpp - src/test/durationutiltest.cpp - #TODO: write useful tests for refactored effects system - #src/test/effectchainslottest.cpp - src/test/enginebufferscalelineartest.cpp - src/test/enginebuffertest.cpp - src/test/enginefilterbiquadtest.cpp - src/test/enginemastertest.cpp - src/test/enginemicrophonetest.cpp - src/test/enginesynctest.cpp - src/test/fileinfo_test.cpp - src/test/frametest.cpp - src/test/globaltrackcache_test.cpp - src/test/hotcuecontrol_test.cpp - src/test/imageutils_test.cpp - src/test/indexrange_test.cpp - src/test/keyutilstest.cpp - src/test/lcstest.cpp - src/test/learningutilstest.cpp - src/test/libraryscannertest.cpp - src/test/librarytest.cpp - src/test/looping_control_test.cpp - src/test/main.cpp - src/test/mathutiltest.cpp - src/test/metadatatest.cpp - #TODO: make this build again - #src/test/metaknob_link_test.cpp - src/test/midicontrollertest.cpp - src/test/mixxxtest.cpp - src/test/movinginterquartilemean_test.cpp - src/test/nativeeffects_test.cpp - src/test/performancetimer_test.cpp - src/test/playcountertest.cpp - src/test/playlisttest.cpp - src/test/portmidicontroller_test.cpp - src/test/portmidienumeratortest.cpp - src/test/queryutiltest.cpp - src/test/rangelist_test.cpp - src/test/readaheadmanager_test.cpp - src/test/replaygaintest.cpp - src/test/rescalertest.cpp - src/test/rgbcolor_test.cpp - src/test/samplebuffertest.cpp - src/test/sampleutiltest.cpp - src/test/schemamanager_test.cpp - src/test/searchqueryparsertest.cpp - src/test/seratobeatgridtest.cpp - src/test/seratomarkerstest.cpp - src/test/seratomarkers2test.cpp - src/test/seratotagstest.cpp - src/test/signalpathtest.cpp - src/test/skincontext_test.cpp - src/test/softtakeover_test.cpp - src/test/soundproxy_test.cpp - src/test/soundsourceproviderregistrytest.cpp - src/test/sqliteliketest.cpp - src/test/synccontroltest.cpp - src/test/tableview_test.cpp - src/test/taglibtest.cpp - src/test/trackdao_test.cpp - src/test/trackexport_test.cpp - src/test/trackmetadata_test.cpp - src/test/tracknumberstest.cpp - src/test/trackreftest.cpp - src/test/trackupdate_test.cpp - src/test/uuid_test.cpp - src/test/wbatterytest.cpp - src/test/wpushbutton_test.cpp - src/test/wwidgetstack_test.cpp -) -set_target_properties(mixxx-test PROPERTIES AUTOMOC ON) -target_link_libraries(mixxx-test PRIVATE mixxx-lib mixxx-gitinfostore gtest gmock) - -# -# Benchmark tests -# - -# Disable testing of google/benchmark -set(BENCHMARK_ENABLE_TESTING OFF CACHE BOOL "" FORCE) - -# Prevent installation of google/benchmark artifacts -set(BENCHMARK_ENABLE_INSTALL OFF CACHE BOOL "Disable installation of google/benchmark" FORCE) - -add_subdirectory( - "${CMAKE_CURRENT_SOURCE_DIR}/lib/benchmark" - "${CMAKE_CURRENT_BINARY_DIR}/lib/benchmark" -) -target_link_libraries(mixxx-test PRIVATE benchmark) - -# Test Suite -include(CTest) -include(GoogleTest) -enable_testing() -gtest_add_tests( - TARGET mixxx-test - EXTRA_ARGS --logLevel info - WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" - TEST_LIST testsuite -) -if (NOT WIN32) - # Default to offscreen rendering during tests. - # This is required if the build system like Fedora koji/mock does not - # allow to pass environment variables into the ctest macro expansion. - set_tests_properties(${testsuite} PROPERTIES ENVIRONMENT "QT_QPA_PLATFORM=offscreen") -endif() - -# Benchmarking -add_custom_target(mixxx-benchmark - COMMAND $ --benchmark - WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" - COMMENT "Mixxx Benchmarks" - VERBATIM -) -add_dependencies(mixxx-benchmark mixxx-test) - -if(UNIX AND USE_SYMLINKS) - add_custom_target(mixxx-testdata - COMMAND ${CMAKE_COMMAND} -E create_symlink "${CMAKE_CURRENT_SOURCE_DIR}/src/test" "${CMAKE_CURRENT_BINARY_DIR}/src/test" - COMMENT "Symlinking test data to build directory..." - ) -elseif(WIN32) - file(TO_NATIVE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/src/test" CMAKE_CURRENT_SOURCE_TESTDATA_DIR_NATIVE) - file(TO_NATIVE_PATH "${CMAKE_CURRENT_BINARY_DIR}/src/test/" CMAKE_CURRENT_BINARY_TESTDATA_DIR_NATIVE) - add_custom_target(mixxx-testdata - COMMAND xcopy ${CMAKE_CURRENT_SOURCE_TESTDATA_DIR_NATIVE} ${CMAKE_CURRENT_BINARY_TESTDATA_DIR_NATIVE} /s /d /q /y - COMMENT "Copying missing or modified test data files to build directory..." - ) -else() - add_custom_target(mixxx-testdata - COMMAND ${CMAKE_COMMAND} -E copy_directory "${CMAKE_CURRENT_SOURCE_DIR}/src/test" "${CMAKE_CURRENT_BINARY_DIR}/src/test" - COMMENT "Copying all test data files to build directory..." - ) -endif() -add_dependencies(mixxx-test mixxx-testdata) - # # Resources # @@ -1765,8 +1598,6 @@ endif() target_sources(mixxx PRIVATE res/mixxx.qrc) set_target_properties(mixxx PROPERTIES AUTORCC ON) -target_sources(mixxx-test PRIVATE res/mixxx.qrc) -set_target_properties(mixxx-test PROPERTIES AUTORCC ON) if (MIXXX_VERSION_PRERELEASE STREQUAL "") set(MIXXX_VERSION "${CMAKE_PROJECT_VERSION}") @@ -2611,7 +2442,6 @@ if(LILV) ) target_compile_definitions(mixxx-lib PUBLIC __LILV__) target_link_libraries(mixxx-lib PRIVATE lilv::lilv) - target_link_libraries(mixxx-test PRIVATE lilv::lilv) endif() # Live Broadcasting (Shoutcast)