mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-12-26 12:27:52 +00:00
566fbe7187
* specials: comment all parser cases * specials: scan_graph: early-return if args is null * specials: fix logic in scan_graph * tests: add scan_graph parsing test * specials: separate command parsing from graph parsing this simplifies the implementation of graph parsing and makes it less ambiguous to parse graphs in contexts where commands are not expected * specials: tweak comments in scan_graph * tests: update for scan_command separation --------- Co-authored-by: bi4k8 <bi4k8@github>
56 lines
1.7 KiB
CMake
56 lines
1.7 KiB
CMake
include(CTest)
|
|
|
|
include_directories(${CMAKE_SOURCE_DIR}/src)
|
|
include_directories(${CMAKE_BINARY_DIR})
|
|
include_directories(${conky_includes})
|
|
|
|
set(test_srcs "test-conky.cc")
|
|
|
|
if(OS_LINUX)
|
|
set(test_srcs ${test_srcs} test-linux.cc)
|
|
endif()
|
|
|
|
if(OS_DARWIN)
|
|
set(test_srcs ${test_srcs} test-darwin.cc)
|
|
endif()
|
|
|
|
set(test_srcs ${test_srcs} test-core.cc)
|
|
set(test_srcs ${test_srcs} test-diskio.cc)
|
|
set(test_srcs ${test_srcs} test-fs.cc)
|
|
set(test_srcs ${test_srcs} test-gradient.cc)
|
|
set(test_srcs ${test_srcs} test-graph.cc)
|
|
set(test_srcs ${test_srcs} test-colours.cc)
|
|
|
|
add_executable(test-conky test-common.cc ${test_srcs})
|
|
target_link_libraries(test-conky conky_core)
|
|
catch_discover_tests(test-conky)
|
|
|
|
if(CODE_COVERAGE)
|
|
set(COVERAGE_LCOV_EXCLUDES
|
|
"*/include/c++/v1/*"
|
|
"/usr/include/*"
|
|
"/usr/lib/*"
|
|
"/usr/local/Cellar/*"
|
|
"/usr/local/include/*"
|
|
"/usr/local/lib/*"
|
|
"/usr/include/libkern/i386/*"
|
|
"/usr/include/sys/_types/*"
|
|
"/usr/local/opt/gettext/include/*"
|
|
"${CMAKE_CURRENT_SOURCE_DIR}/*"
|
|
"${CMAKE_CURRENT_SOURCE_DIR}/catch2/*"
|
|
"${CMAKE_SOURCE_DIR}/3rdparty/*")
|
|
|
|
setup_target_for_coverage_lcov_html(NAME
|
|
test-conky-coverage-html
|
|
EXECUTABLE
|
|
test-conky
|
|
DEPENDENCIES
|
|
test-conky)
|
|
setup_target_for_coverage_lcov_txt(NAME
|
|
test-conky-coverage-txt
|
|
EXECUTABLE
|
|
test-conky
|
|
DEPENDENCIES
|
|
test-conky)
|
|
endif()
|