From 6719a41aef0af3776a4d0a55443d6c4131bbb39f Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 17 Feb 2020 15:05:00 +0100 Subject: [PATCH] [libcalamares] Switch tests to calamares_add_test() --- src/libcalamares/CMakeLists.txt | 113 +++++++++++--------------------- 1 file changed, 40 insertions(+), 73 deletions(-) diff --git a/src/libcalamares/CMakeLists.txt b/src/libcalamares/CMakeLists.txt index ae927eda1..803c46870 100644 --- a/src/libcalamares/CMakeLists.txt +++ b/src/libcalamares/CMakeLists.txt @@ -158,81 +158,48 @@ install( FILES ${utilsHeaders} DESTINATION include/libcalam ### TESTING # # -if ( ECM_FOUND AND BUILD_TESTING ) - ecm_add_test( - utils/Tests.cpp - TEST_NAME - libcalamarestest - LINK_LIBRARIES - calamares - Qt5::Core - Qt5::Test - ) - calamares_automoc( libcalamarestest ) - - ecm_add_test( - utils/TestPaths.cpp - TEST_NAME - libcalamarestestpaths - LINK_LIBRARIES - calamares - Qt5::Core - Qt5::Test - ) - calamares_automoc( libcalamarestestpaths ) +calamares_add_test( + libcalamarestest + SOURCES + utils/Tests.cpp +) +calamares_add_test( + libcalamarestestpaths + SOURCES + utils/TestPaths.cpp +) - ecm_add_test( - geoip/GeoIPTests.cpp - ${geoip_src} - TEST_NAME - geoiptest - LINK_LIBRARIES - calamares - Qt5::Test - ) - calamares_automoc( geoiptest ) - - ecm_add_test( - partition/Tests.cpp - TEST_NAME - libcalamarespartitiontest - LINK_LIBRARIES - calamares - Qt5::Test - ) - calamares_automoc( libcalamarespartitiontest ) - - ecm_add_test( - locale/Tests.cpp - TEST_NAME - libcalamareslocaletest - LINK_LIBRARIES - calamares - Qt5::Test - ) - calamares_automoc( libcalamareslocaletest ) - - ecm_add_test( - network/Tests.cpp - TEST_NAME - libcalamaresnetworktest - LINK_LIBRARIES - calamares - Qt5::Test - ) - calamares_automoc( libcalamaresnetworktest ) - - ecm_add_test( - modulesystem/Tests.cpp - TEST_NAME - libcalamaresmodulesystemtest - LINK_LIBRARIES - calamares - Qt5::Test - ) - calamares_automoc( libcalamaresmodulesystemtest ) -endif() +calamares_add_test( + geoiptest + SOURCES + geoip/GeoIPTests.cpp + ${geoip_src} +) + +calamares_add_test( + libcalamarespartitiontest + SOURCES + partition/Tests.cpp +) + +calamares_add_test( + libcalamareslocaletest + SOURCES + locale/Tests.cpp +) + +calamares_add_test( + libcalamaresnetworktest + SOURCES + network/Tests.cpp +) + +calamares_add_test( + libcalamaresmodulesystemtest + SOURCES + modulesystem/Tests.cpp +) if( BUILD_TESTING ) add_executable( test_geoip geoip/test_geoip.cpp ${geoip_src} )