diff options
author | Přemysl Eric Janouch <p@janouch.name> | 2023-06-15 16:21:18 +0200 |
---|---|---|
committer | Přemysl Eric Janouch <p@janouch.name> | 2023-06-15 16:24:16 +0200 |
commit | 951208c15b5d92c330d890436ab26ffa478c5e27 (patch) | |
tree | 7013171b22f7f7982993109913ce0c724dcc89eb /CMakeLists.txt | |
parent | 74d9acecb58a2ca3ca917d40ef374a619501acbe (diff) | |
download | tdv-951208c15b5d92c330d890436ab26ffa478c5e27.tar.gz tdv-951208c15b5d92c330d890436ab26ffa478c5e27.tar.xz tdv-951208c15b5d92c330d890436ab26ffa478c5e27.zip |
Test SVG and desktop file validity
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index f995dd4..f871ea7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -380,14 +380,12 @@ endif () # Do some unit tests option (BUILD_TESTING "Build tests" OFF) -set (project_tests stardict) - if (BUILD_TESTING) enable_testing () find_program (xmlwf_EXECUTABLE xmlwf) find_program (xmllint_EXECUTABLE xmllint) - foreach (xml ${PROJECT_NAME}.xml) + foreach (xml ${PROJECT_NAME}.xml ${PROJECT_NAME}.svg) if (xmlwf_EXECUTABLE) add_test (test-xmlwf-${xml} ${xmlwf_EXECUTABLE} ${PROJECT_SOURCE_DIR}/${xml}) @@ -398,7 +396,15 @@ if (BUILD_TESTING) endif () endforeach () - foreach (name ${project_tests}) + find_program (dfv_EXECUTABLE desktop-file-validate) + if (dfv_EXECUTABLE) + foreach (df ${PROJECT_NAME}.desktop) + add_test (test-dfv-${df} ${dfv_EXECUTABLE} + ${PROJECT_SOURCE_DIR}/${df}) + endforeach () + endif () + + foreach (name stardict) add_executable (test-${name} src/test-${name}.c ${project_common_sources}) target_link_libraries (test-${name} ${project_common_libraries}) |