From a7e723d8366eda725fc022dc90388d79f247d22c Mon Sep 17 00:00:00 2001 From: jkriege2 Date: Tue, 23 Jan 2024 11:51:50 +0100 Subject: [PATCH] fix test-declaration in CMake-Files --- CMakeLists.txt | 1 + appveyor.yml | 8 ++++++-- tests/CMakeLists.txt | 2 +- tests/jkqtcommmon/CMakeLists.txt | 2 +- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8c34b7905c..564fbea2af 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -72,6 +72,7 @@ if(CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR) add_subdirectory(doc) if (JKQtPlotter_BUILD_TESTS) + include(CTest) add_subdirectory(tests) endif() diff --git a/appveyor.yml b/appveyor.yml index c4d3779d69..2bcdbf238f 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -288,6 +288,10 @@ for: echo == RUNNING UNIT TESTS FOR JKQtPlotter CMAKE BUILD =============================================== cd $APPVEYOR_BUILD_FOLDER cd build + ls *. + ls -l *.* + ls -l Testing/* + ls -l Testing/*.* ctest --version ctest --print-labels --build-config "$CONFIGURATION" ctest --build-config "$CONFIGURATION" -VV --output-on-failure --output-junit test-results.xml @@ -334,7 +338,7 @@ for: artifacts: - - path: 'build/CMakeFiles/*.log' + - path: '$APPVEYOR_BUILD_FOLDER/build/CMakeFiles/*.log' name: logs - - path: 'build/Testing/**/*.xml' + - path: '$APPVEYOR_BUILD_FOLDER/build/Testing/**/*.xml' name: test_results \ No newline at end of file diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index ef340f7928..d61b4f75a6 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -10,7 +10,7 @@ else() message( STATUS ".. - Precompiled Header: OFF") endif() message( STATUS "............................................................................." ) - +include(CTest) enable_testing() find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Test REQUIRED) diff --git a/tests/jkqtcommmon/CMakeLists.txt b/tests/jkqtcommmon/CMakeLists.txt index 32f19d26d0..eeaa9d83cd 100644 --- a/tests/jkqtcommmon/CMakeLists.txt +++ b/tests/jkqtcommmon/CMakeLists.txt @@ -20,7 +20,7 @@ target_sources(${EXENAME} # Installation install(TARGETS ${EXENAME} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) -add_test(NAME ${TEST_NAME} COMMAND ${EXENAME}) +add_test(NAME ${TEST_NAME} COMMAND COMMAND $) #Installation of Qt DLLs on Windows jkqtplotter_deployqt(${EXENAME})