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

Return to bug 822357