Commit fd29cd13 by Ben Straub

Moved testing resources to clar, and removed old tests directory.

Removed the BUILD_CLAR CMake flag, and updated the readme.
parent 270303ca
...@@ -51,8 +51,7 @@ SET(INSTALL_INC include CACHE PATH "Where to install headers to.") ...@@ -51,8 +51,7 @@ SET(INSTALL_INC include CACHE PATH "Where to install headers to.")
# Build options # Build options
OPTION (BUILD_SHARED_LIBS "Build Shared Library (OFF for Static)" ON) OPTION (BUILD_SHARED_LIBS "Build Shared Library (OFF for Static)" ON)
OPTION (THREADSAFE "Build libgit2 as threadsafe" OFF) OPTION (THREADSAFE "Build libgit2 as threadsafe" OFF)
OPTION (BUILD_TESTS "Build Tests" ON) OPTION (BUILD_CLAR "Build Tests using the Clar suite" ON)
OPTION (BUILD_CLAR "Build Tests using the Clar suite" OFF)
OPTION (TAGS "Generate tags" OFF) OPTION (TAGS "Generate tags" OFF)
# Platform specific compilation flags # Platform specific compilation flags
...@@ -128,29 +127,10 @@ INSTALL(DIRECTORY include/git2 DESTINATION ${INSTALL_INC} ) ...@@ -128,29 +127,10 @@ INSTALL(DIRECTORY include/git2 DESTINATION ${INSTALL_INC} )
INSTALL(FILES include/git2.h DESTINATION ${INSTALL_INC} ) INSTALL(FILES include/git2.h DESTINATION ${INSTALL_INC} )
# Tests # Tests
IF (BUILD_TESTS)
SET(TEST_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/tests/resources" CACHE PATH "Path to test resources.")
ADD_DEFINITIONS(-DTEST_RESOURCES=\"${TEST_RESOURCES}\")
INCLUDE_DIRECTORIES(tests)
FILE(GLOB SRC_TEST tests/t??-*.c)
ADD_EXECUTABLE(libgit2_test tests/test_main.c tests/test_lib.c tests/test_helpers.c ${SRC} ${SRC_TEST} ${SRC_ZLIB} ${SRC_HTTP} ${SRC_REGEX})
TARGET_LINK_LIBRARIES(libgit2_test ${CMAKE_THREAD_LIBS_INIT})
IF (WIN32)
TARGET_LINK_LIBRARIES(libgit2_test ws2_32)
ELSEIF (CMAKE_SYSTEM_NAME MATCHES "(Solaris|SunOS)")
TARGET_LINK_LIBRARIES(libgit2_test socket nsl)
ENDIF ()
ENABLE_TESTING()
ADD_TEST(libgit2_test libgit2_test)
ENDIF ()
IF (BUILD_CLAR) IF (BUILD_CLAR)
FIND_PACKAGE(PythonInterp REQUIRED) FIND_PACKAGE(PythonInterp REQUIRED)
SET(CLAR_FIXTURES "${CMAKE_CURRENT_SOURCE_DIR}/tests/resources/") SET(CLAR_FIXTURES "${CMAKE_CURRENT_SOURCE_DIR}/tests-clar/resources/")
SET(CLAR_PATH "${CMAKE_CURRENT_SOURCE_DIR}/tests-clar") SET(CLAR_PATH "${CMAKE_CURRENT_SOURCE_DIR}/tests-clar")
ADD_DEFINITIONS(-DCLAR_FIXTURE_PATH=\"${CLAR_FIXTURES}\") ADD_DEFINITIONS(-DCLAR_FIXTURE_PATH=\"${CLAR_FIXTURES}\")
......
...@@ -68,8 +68,7 @@ The following CMake variables are declared: ...@@ -68,8 +68,7 @@ The following CMake variables are declared:
- `INSTALL_LIB`: Where to install libraries to. - `INSTALL_LIB`: Where to install libraries to.
- `INSTALL_INC`: Where to install headers to. - `INSTALL_INC`: Where to install headers to.
- `BUILD_SHARED_LIBS`: Build libgit2 as a Shared Library (defaults to ON) - `BUILD_SHARED_LIBS`: Build libgit2 as a Shared Library (defaults to ON)
- `BUILD_TESTS`: Build the libgit2 test suite (defaults to ON) - `BUILD_CLAR`: Build [Clar](https://github.com/tanoku/clar)-based test suite (defaults to ON)
- `BUILD_CLAR`: Build [Clar](https://github.com/tanoku/clar)-based test suite (defaults to OFF)
- `THREADSAFE`: Build libgit2 with threading support (defaults to OFF) - `THREADSAFE`: Build libgit2 with threading support (defaults to OFF)
Language Bindings Language Bindings
......
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