Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 822357 | Differences between
and this patch

Collapse All | Expand All

(-)a/CMakeLists.txt (-171 lines)
Lines 1593-1766 add_subdirectory( Link Here
1593
  "${CMAKE_CURRENT_BINARY_DIR}/lib/googletest"
1593
  "${CMAKE_CURRENT_BINARY_DIR}/lib/googletest"
1594
)
1594
)
1595
1595
1596
add_executable(mixxx-test
1597
  src/test/analyserwaveformtest.cpp
1598
  src/test/analyzersilence_test.cpp
1599
  src/test/audiotaperpot_test.cpp
1600
  src/test/autodjprocessor_test.cpp
1601
  src/test/beatgridtest.cpp
1602
  src/test/beatmaptest.cpp
1603
  src/test/beatstest.cpp
1604
  src/test/beatstranslatetest.cpp
1605
  src/test/bpmtest.cpp
1606
  src/test/bpmcontrol_test.cpp
1607
  src/test/broadcastprofile_test.cpp
1608
  src/test/broadcastsettings_test.cpp
1609
  src/test/cache_test.cpp
1610
  src/test/channelhandle_test.cpp
1611
  src/test/colorconfig_test.cpp
1612
  src/test/colormapperjsproxy_test.cpp
1613
  src/test/colorpalette_test.cpp
1614
  src/test/configobject_test.cpp
1615
  src/test/controller_mapping_validation_test.cpp
1616
  src/test/controllerscriptenginelegacy_test.cpp
1617
  src/test/controlobjecttest.cpp
1618
  src/test/controlobjectscripttest.cpp
1619
  src/test/coreservicestest.cpp
1620
  src/test/coverartcache_test.cpp
1621
  src/test/coverartutils_test.cpp
1622
  src/test/cratestorage_test.cpp
1623
  src/test/cue_test.cpp
1624
  src/test/cuecontrol_test.cpp
1625
  src/test/dbconnectionpool_test.cpp
1626
  src/test/dbidtest.cpp
1627
  src/test/directorydaotest.cpp
1628
  src/test/duration_test.cpp
1629
  src/test/durationutiltest.cpp
1630
  #TODO: write useful tests for refactored effects system
1631
  #src/test/effectchainslottest.cpp
1632
  src/test/enginebufferscalelineartest.cpp
1633
  src/test/enginebuffertest.cpp
1634
  src/test/enginefilterbiquadtest.cpp
1635
  src/test/enginemastertest.cpp
1636
  src/test/enginemicrophonetest.cpp
1637
  src/test/enginesynctest.cpp
1638
  src/test/fileinfo_test.cpp
1639
  src/test/frametest.cpp
1640
  src/test/globaltrackcache_test.cpp
1641
  src/test/hotcuecontrol_test.cpp
1642
  src/test/imageutils_test.cpp
1643
  src/test/indexrange_test.cpp
1644
  src/test/keyutilstest.cpp
1645
  src/test/lcstest.cpp
1646
  src/test/learningutilstest.cpp
1647
  src/test/libraryscannertest.cpp
1648
  src/test/librarytest.cpp
1649
  src/test/looping_control_test.cpp
1650
  src/test/main.cpp
1651
  src/test/mathutiltest.cpp
1652
  src/test/metadatatest.cpp
1653
  #TODO: make this build again
1654
  #src/test/metaknob_link_test.cpp
1655
  src/test/midicontrollertest.cpp
1656
  src/test/mixxxtest.cpp
1657
  src/test/movinginterquartilemean_test.cpp
1658
  src/test/nativeeffects_test.cpp
1659
  src/test/performancetimer_test.cpp
1660
  src/test/playcountertest.cpp
1661
  src/test/playermanagertest.cpp
1662
  src/test/playlisttest.cpp
1663
  src/test/portmidicontroller_test.cpp
1664
  src/test/portmidienumeratortest.cpp
1665
  src/test/queryutiltest.cpp
1666
  src/test/rangelist_test.cpp
1667
  src/test/readaheadmanager_test.cpp
1668
  src/test/replaygaintest.cpp
1669
  src/test/rescalertest.cpp
1670
  src/test/rgbcolor_test.cpp
1671
  src/test/samplebuffertest.cpp
1672
  src/test/sampleutiltest.cpp
1673
  src/test/schemamanager_test.cpp
1674
  src/test/searchqueryparsertest.cpp
1675
  src/test/seratobeatgridtest.cpp
1676
  src/test/seratomarkerstest.cpp
1677
  src/test/seratomarkers2test.cpp
1678
  src/test/seratotagstest.cpp
1679
  src/test/signalpathtest.cpp
1680
  src/test/skincontext_test.cpp
1681
  src/test/softtakeover_test.cpp
1682
  src/test/soundproxy_test.cpp
1683
  src/test/soundsourceproviderregistrytest.cpp
1684
  src/test/sqliteliketest.cpp
1685
  src/test/synccontroltest.cpp
1686
  src/test/synctrackmetadatatest.cpp
1687
  src/test/tableview_test.cpp
1688
  src/test/taglibtest.cpp
1689
  src/test/trackdao_test.cpp
1690
  src/test/trackexport_test.cpp
1691
  src/test/trackmetadata_test.cpp
1692
  src/test/tracknumberstest.cpp
1693
  src/test/trackreftest.cpp
1694
  src/test/trackupdate_test.cpp
1695
  src/test/uuid_test.cpp
1696
  src/test/wbatterytest.cpp
1697
  src/test/wpushbutton_test.cpp
1698
  src/test/wwidgetstack_test.cpp
1699
)
1700
set_target_properties(mixxx-test PROPERTIES AUTOMOC ON)
1701
target_link_libraries(mixxx-test PRIVATE mixxx-lib mixxx-gitinfostore gtest gmock)
1702
1703
#
1704
# Benchmark tests
1705
#
1706
1707
# Disable testing of google/benchmark
1708
set(BENCHMARK_ENABLE_TESTING OFF CACHE BOOL "" FORCE)
1709
1710
# Prevent installation of google/benchmark artifacts
1711
set(BENCHMARK_ENABLE_INSTALL OFF CACHE BOOL "Disable installation of google/benchmark" FORCE)
1712
1713
add_subdirectory(
1714
  "${CMAKE_CURRENT_SOURCE_DIR}/lib/benchmark"
1715
  "${CMAKE_CURRENT_BINARY_DIR}/lib/benchmark"
1716
)
1717
target_link_libraries(mixxx-test PRIVATE benchmark)
1718
1719
# Test Suite
1720
include(CTest)
1721
include(GoogleTest)
1722
enable_testing()
1723
gtest_add_tests(
1724
  TARGET mixxx-test
1725
  EXTRA_ARGS --logLevel info
1726
  WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
1727
  TEST_LIST testsuite
1728
)
1729
if (NOT WIN32)
1730
  # Default to offscreen rendering during tests.
1731
  # This is required if the build system like Fedora koji/mock does not
1732
  # allow to pass environment variables into the ctest macro expansion.
1733
  set_tests_properties(${testsuite} PROPERTIES ENVIRONMENT "QT_QPA_PLATFORM=offscreen")
1734
endif()
1735
1736
# Benchmarking
1737
add_custom_target(mixxx-benchmark
1738
  COMMAND $<TARGET_FILE:mixxx-test> --benchmark
1739
  WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
1740
  COMMENT "Mixxx Benchmarks"
1741
  VERBATIM
1742
)
1743
add_dependencies(mixxx-benchmark mixxx-test)
1744
1745
if(UNIX AND USE_SYMLINKS)
1746
  add_custom_target(mixxx-testdata
1747
    COMMAND ${CMAKE_COMMAND} -E create_symlink "${CMAKE_CURRENT_SOURCE_DIR}/src/test" "${CMAKE_CURRENT_BINARY_DIR}/src/test"
1748
    COMMENT "Symlinking test data to build directory..."
1749
  )
1750
elseif(WIN32)
1751
  file(TO_NATIVE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/src/test" CMAKE_CURRENT_SOURCE_TESTDATA_DIR_NATIVE)
1752
  file(TO_NATIVE_PATH "${CMAKE_CURRENT_BINARY_DIR}/src/test/" CMAKE_CURRENT_BINARY_TESTDATA_DIR_NATIVE)
1753
  add_custom_target(mixxx-testdata
1754
    COMMAND xcopy ${CMAKE_CURRENT_SOURCE_TESTDATA_DIR_NATIVE} ${CMAKE_CURRENT_BINARY_TESTDATA_DIR_NATIVE} /s /d /q /y
1755
    COMMENT "Copying missing or modified test data files to build directory..."
1756
  )
1757
else()
1758
  add_custom_target(mixxx-testdata
1759
    COMMAND ${CMAKE_COMMAND} -E copy_directory "${CMAKE_CURRENT_SOURCE_DIR}/src/test" "${CMAKE_CURRENT_BINARY_DIR}/src/test"
1760
    COMMENT "Copying all test data files to build directory..."
1761
  )
1762
endif()
1763
add_dependencies(mixxx-test mixxx-testdata)
1764
1596
1765
#
1597
#
1766
# Resources
1598
# Resources
Lines 1791-1798 endif() Link Here
1791
1623
1792
target_sources(mixxx PRIVATE res/mixxx.qrc)
1624
target_sources(mixxx PRIVATE res/mixxx.qrc)
1793
set_target_properties(mixxx PROPERTIES AUTORCC ON)
1625
set_target_properties(mixxx PROPERTIES AUTORCC ON)
1794
target_sources(mixxx-test PRIVATE res/mixxx.qrc)
1795
set_target_properties(mixxx-test PROPERTIES AUTORCC ON)
1796
1626
1797
if (MIXXX_VERSION_PRERELEASE STREQUAL "")
1627
if (MIXXX_VERSION_PRERELEASE STREQUAL "")
1798
   set(MIXXX_VERSION "${CMAKE_PROJECT_VERSION}")
1628
   set(MIXXX_VERSION "${CMAKE_PROJECT_VERSION}")
Lines 2690-2696 if(LILV) Link Here
2690
  )
2520
  )
2691
  target_compile_definitions(mixxx-lib PUBLIC __LILV__)
2521
  target_compile_definitions(mixxx-lib PUBLIC __LILV__)
2692
  target_link_libraries(mixxx-lib PRIVATE lilv::lilv)
2522
  target_link_libraries(mixxx-lib PRIVATE lilv::lilv)
2693
  target_link_libraries(mixxx-test PRIVATE lilv::lilv)
2694
endif()
2523
endif()
2695
2524
2696
# Live Broadcasting (Shoutcast)
2525
# Live Broadcasting (Shoutcast)

Return to bug 822357