Reply to topic

KDevelop doesn't see Unit Tests in sup-directory

User avatar dporobic
Registered Member
Posts
3
Karma
0
OS
Hi All,

Can someone help me figure out how to configure KDevelop to find Unit Tests that are build in a sub directory?
In the project root directory I have a "build", "src" and "tests" directory, the tests are build within "build/tests" and they work fine when I run ctest from build/tests, but when I use Run -> Run All Tests from KDevelop, nothing happens. Also, the Unit Tests window is also empty.

Any Idea how I could tell KDevelop where those tests are located? Or am I doing something wrong here?

Here root CMakeLists file:
Code: Select all
cmake_minimum_required(VERSION 3.0)

project(kimageannotator)

set(QT_MIN_VERSION     "5.7.0")
set(KF5_MIN_VERSION    "5.29.0")
set(PLASMA_MIN_VERSION "5.4.0")

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
set(CMAKE_AUTOMOC ON)

find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules
                      ${CMAKE_MODULE_PATH}
                      ${ECM_MODULE_PATH}
                      ${ECM_KDE_MODULE_DIR}
)

include(KDEInstallDirs)

add_subdirectory(src)
add_subdirectory(tests)


And here the CMakeLists file in the tests directory:
Code: Select all
enable_testing(true)

find_package(Qt5 ${QT_MIN_VERSION} REQUIRED Test Widgets)

# Annotation Area Test
add_executable(AnnotationAreaTest AnnotationAreaTest.cpp ${CMAKE_SOURCE_DIR}/src/AnnotationArea.cpp)
target_link_libraries(AnnotationAreaTest Qt5::Test Qt5::Widgets)
add_test(AnnotationTest AnnotationAreaTest)


Thanks in advance!
User avatar dporobic
Registered Member
Posts
3
Karma
0
OS
Anyone? Any idea?
User avatar nshiell
Registered Member
Posts
11
Karma
0
I'm also playing with this, did you find a solution?
User avatar dporobic
Registered Member
Posts
3
Karma
0
OS
Unfortunately not, I've changed the IDE meanwhile so didn't investigate this further.

 
Reply to topic

Bookmarks



Who is online

Registered users: Baidu [Spider], bigboss97, Bing [Bot], DigitalDeviant, Exabot [Bot], Google [Bot], Snudl, Yahoo [Bot]