mirror of
https://github.com/libgit2/libgit2.git
synced 2026-06-22 06:26:26 +00:00
clar: introduce CLAR_XML option
Introduce a CLAR_XML option, to run the `ctest` commands with the new `-r` flag to clar. Permitted values are `OFF`, `ON` and a directory to write the XML test results to.
This commit is contained in:
@@ -62,6 +62,8 @@ OPTION(USE_EXT_HTTP_PARSER "Use system HTTP_Parser if available" ON)
|
||||
OPTION(DEBUG_POOL "Enable debug pool allocator" OFF)
|
||||
OPTION(ENABLE_WERROR "Enable compilation with -Werror" OFF)
|
||||
OPTION(USE_BUNDLED_ZLIB "Use the bundled version of zlib" OFF)
|
||||
SET(CLAR_XML "OFF" CACHE STRING
|
||||
"Writes test results in XML format. One of ON, OFF or the directory to write to; this does not affect the output executables, this only affects the behavior of the ctest command.")
|
||||
|
||||
IF (UNIX AND NOT APPLE)
|
||||
OPTION(ENABLE_REPRODUCIBLE_BUILDS "Enable reproducible builds" OFF)
|
||||
|
||||
@@ -54,8 +54,22 @@ IF (MSVC_IDE)
|
||||
SET_SOURCE_FILES_PROPERTIES("precompiled.c" COMPILE_FLAGS "/Ycprecompiled.h")
|
||||
ENDIF ()
|
||||
|
||||
ADD_TEST(offline "${libgit2_BINARY_DIR}/libgit2_clar" -v -xonline)
|
||||
ADD_TEST(online "${libgit2_BINARY_DIR}/libgit2_clar" -v -sonline)
|
||||
ADD_TEST(gitdaemon "${libgit2_BINARY_DIR}/libgit2_clar" -v -sonline::push)
|
||||
ADD_TEST(ssh "${libgit2_BINARY_DIR}/libgit2_clar" -v -sonline::push -sonline::clone::ssh_cert -sonline::clone::ssh_with_paths)
|
||||
ADD_TEST(proxy "${libgit2_BINARY_DIR}/libgit2_clar" -v -sonline::clone::proxy_credentials_in_url -sonline::clone::proxy_credentials_request)
|
||||
IF (CLAR_XML)
|
||||
IF (CLAR_XML STREQUAL "ON")
|
||||
SET(XML_PATH "")
|
||||
ELSE ()
|
||||
SET(XML_PATH "${CLAR_XML}/")
|
||||
ENDIF ()
|
||||
|
||||
SET(TESTS_OFFLINE_XML "-r${XML_PATH}results_offline.xml")
|
||||
SET(TESTS_ONLINE_XML "-r${XML_PATH}results_online.xml")
|
||||
SET(TESTS_GITDAEMON_XML "-r${XML_PATH}results_gitdaemon.xml")
|
||||
SET(TESTS_SSH_XML "-r${XML_PATH}results_ssh.xml")
|
||||
SET(TESTS_PROXY_XML "-r${XML_PATH}results_proxy.xml")
|
||||
ENDIF ()
|
||||
|
||||
ADD_TEST(offline "${libgit2_BINARY_DIR}/libgit2_clar" -v ${TESTS_OFFLINE_XML} -xonline)
|
||||
ADD_TEST(online "${libgit2_BINARY_DIR}/libgit2_clar" -v ${TESTS_ONLINE_XML} -sonline)
|
||||
ADD_TEST(gitdaemon "${libgit2_BINARY_DIR}/libgit2_clar" -v ${TESTS_GITDAEMON_XML} -sonline::push)
|
||||
ADD_TEST(ssh "${libgit2_BINARY_DIR}/libgit2_clar" -v ${TESTS_SSH_XML} -sonline::push -sonline::clone::ssh_cert -sonline::clone::ssh_with_paths)
|
||||
ADD_TEST(proxy "${libgit2_BINARY_DIR}/libgit2_clar" -v ${TESTS_PROXY_XML} -sonline::clone::proxy_credentials_in_url -sonline::clone::proxy_credentials_request)
|
||||
|
||||
Reference in New Issue
Block a user