From bd2ef80bbb3d4348f3410363b4be6bbe0773ed3f Mon Sep 17 00:00:00 2001 From: Sergio Martins Date: Sun, 18 Jul 2021 11:49:31 +0100 Subject: [PATCH] cmake: Use add_test, so tests are compatible with ctest Only for clazy plugin for now. Debugging why clazy-standalone's tests are failing. --- .gitignore | 1 + CMakeLists.txt | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/.gitignore b/.gitignore index a054d4cb..b98cb33f 100644 --- a/.gitignore +++ b/.gitignore @@ -38,3 +38,4 @@ checks.json.h .cmake file.hh.gch /build-* +*.o.tmp diff --git a/CMakeLists.txt b/CMakeLists.txt index 967c1285..f94f96da 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -337,4 +337,11 @@ file(READ checks.json SUPPORTED_CHECKS_JSON_STR) to_raw_string_literal(${SUPPORTED_CHECKS_JSON_STR} SUPPORTED_CHECKS_JSON_STR) configure_file(checks.json.h.in checks.json.h) +enable_testing() + +# Tests for the clazy clang plugin +add_test(NAME clazy-plugin + COMMAND python3 run_tests.py --no-standalone + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/tests/) + install(FILES org.kde.clazy.metainfo.xml DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/metainfo)