Commit b3e00a01 by Patrick Steinhardt

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.

(cherry picked from commit a2d73f56)
parent d95d2201
......@@ -44,6 +44,8 @@ OPTION( USE_GSSAPI "Link with libgssapi for SPNEGO auth" OFF )
OPTION( VALGRIND "Configure build for valgrind" OFF )
OPTION( CURL "Use curl for HTTP if available" ON)
OPTION( DEBUG_POOL "Enable debug pool allocator" 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(DEBUG_POOL)
ADD_DEFINITIONS(-DGIT_DEBUG_POOL)
......@@ -704,11 +706,25 @@ IF (BUILD_CLAR)
ENABLE_TESTING()
ADD_TEST(offline libgit2_clar -v -xonline)
ADD_TEST(online libgit2_clar -v -sonline)
ADD_TEST(gitdaemon libgit2_clar -v -sonline::push)
ADD_TEST(ssh libgit2_clar -v -sonline::push -sonline::clone::ssh_cert -sonline::clone::ssh_with_paths)
ADD_TEST(proxy 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_clar -v ${TESTS_OFFLINE_XML} -xonline)
ADD_TEST(online libgit2_clar -v ${TESTS_ONLINE_XML} -sonline)
ADD_TEST(gitdaemon libgit2_clar -v ${TESTS_GITDAEMON_XML} -sonline::push)
ADD_TEST(ssh libgit2_clar -v ${TESTS_SSH_XML} -sonline::push -sonline::clone::ssh_cert -sonline::clone::ssh_with_paths)
ADD_TEST(proxy libgit2_clar -v ${TESTS_PROXY_XML} -sonline::clone::proxy_credentials_in_url -sonline::clone::proxy_credentials_request)
ENDIF ()
IF (TAGS)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment