cmake: BUILD_CLAR is now BUILD_TESTS Nobody knows what CLAR is. The test building option should be `BUILD_TESTS`.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3dccec3..81ef04f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -38,7 +38,7 @@ INCLUDE(EnableWarnings)
OPTION(SONAME "Set the (SO)VERSION of the target" ON)
OPTION(BUILD_SHARED_LIBS "Build Shared Library (OFF for Static)" ON)
OPTION(THREADSAFE "Build libgit2 as threadsafe" ON)
-OPTION(BUILD_CLAR "Build Tests using the Clar suite" ON)
+OPTION(BUILD_TESTS "Build Tests using the Clar suite" ON)
OPTION(BUILD_EXAMPLES "Build library usage example apps" OFF)
OPTION(BUILD_FUZZERS "Build the fuzz targets" OFF)
OPTION(ENABLE_TRACE "Enables tracing support" ON)
@@ -281,7 +281,7 @@ IF (NOT MSVC)
ENDIF()
ENDIF ()
-IF (BUILD_CLAR)
+IF (BUILD_TESTS)
ENABLE_TESTING()
ADD_SUBDIRECTORY(tests)
ENDIF ()
@@ -295,7 +295,7 @@ IF(BUILD_FUZZERS)
IF(BUILD_EXAMPLES)
MESSAGE(FATAL_ERROR "Cannot build the fuzzer targets and the examples together")
ENDIF()
- IF(BUILD_CLAR)
+ IF(BUILD_TESTS)
MESSAGE(FATAL_ERROR "Cannot build the fuzzer targets and the tests together")
ENDIF()
ENDIF()
diff --git a/README.md b/README.md
index 0cbde52..ea1c8e2 100644
--- a/README.md
+++ b/README.md
@@ -278,7 +278,7 @@ The following CMake variables are declared:
- `CMAKE_INSTALL_LIBDIR`: Where to install libraries to.
- `CMAKE_INSTALL_INCLUDEDIR`: Where to install headers to.
- `BUILD_SHARED_LIBS`: Build libgit2 as a Shared Library (defaults to ON)
-- `BUILD_CLAR`: Build [Clar](https://github.com/vmg/clar)-based test suite (defaults to ON)
+- `BUILD_TESTS`: Build the unit and integration test suites (defaults to ON)
- `THREADSAFE`: Build libgit2 with threading support (defaults to ON)
To list all build options and their current value, you can do the
diff --git a/docs/fuzzing.md b/docs/fuzzing.md
index 25b32cb..2bf4ccc 100644
--- a/docs/fuzzing.md
+++ b/docs/fuzzing.md
@@ -19,7 +19,7 @@ automated fuzz testing. libFuzzer only works with clang.
and [`leak`/`address,leak`](https://clang.llvm.org/docs/LeakSanitizer.html).
3. Create the cmake build environment and configure the build with the
sanitizer chosen: `CC=/usr/bin/clang-6.0 CFLAGS="-fsanitize=address" cmake
- -DBUILD_CLAR=OFF -DBUILD_FUZZERS=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo ..`.
+ -DBUILD_TESTS=OFF -DBUILD_FUZZERS=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo ..`.
Note that building the fuzzer targets is incompatible with the
tests and examples.
4. Build libgit2: `cmake --build .`
diff --git a/fuzzers/corpora/objects/blob b/fuzzers/corpora/objects/blob
index 9fe99d8..2031037 100644
--- a/fuzzers/corpora/objects/blob
+++ b/fuzzers/corpora/objects/blob
@@ -64,7 +64,7 @@ slack channel once you've registered.
If you have questions about the library, please be sure to check out the
[API documentation](http://libgit2.github.com/libgit2/). If you still have
-questions, reach out to us on Slack or post a question on
+questions, reach out to us on Slack or post a question on
[StackOverflow](http://stackoverflow.com/questions/tagged/libgit2) (with the `libgit2` tag).
**Reporting Bugs**
@@ -229,7 +229,7 @@ The following CMake variables are declared:
- `LIB_INSTALL_DIR`: Where to install libraries to.
- `INCLUDE_INSTALL_DIR`: Where to install headers to.
- `BUILD_SHARED_LIBS`: Build libgit2 as a Shared Library (defaults to ON)
-- `BUILD_CLAR`: Build [Clar](https://github.com/vmg/clar)-based test suite (defaults to ON)
+- `BUILD_TESTS`: Build [Clar](https://github.com/vmg/clar)-based test suite (defaults to ON)
- `THREADSAFE`: Build libgit2 with threading support (defaults to ON)
- `STDCALL`: Build libgit2 as `stdcall`. Turn off for `cdecl` (Windows; defaults to ON)
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 49999f4..74423fb 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -3,7 +3,7 @@ FIND_PACKAGE(PythonInterp)
IF(NOT PYTHONINTERP_FOUND)
MESSAGE(FATAL_ERROR "Could not find a python interpeter, which is needed to build the tests. "
- "Make sure python is available, or pass -DBUILD_CLAR=OFF to skip building the tests")
+ "Make sure python is available, or pass -DBUILD_TESTS=OFF to skip building the tests")
ENDIF()
SET(CLAR_FIXTURES "${CMAKE_CURRENT_SOURCE_DIR}/resources/")
@@ -39,26 +39,26 @@ SET_SOURCE_FILES_PROPERTIES(
INCLUDE_DIRECTORIES(${LIBGIT2_INCLUDES})
INCLUDE_DIRECTORIES(SYSTEM ${LIBGIT2_SYSTEM_INCLUDES})
-ADD_EXECUTABLE(libgit2_clar ${SRC_CLAR} ${SRC_TEST} ${LIBGIT2_OBJECTS})
+ADD_EXECUTABLE(libgit2_tests ${SRC_CLAR} ${SRC_TEST} ${LIBGIT2_OBJECTS})
-SET_TARGET_PROPERTIES(libgit2_clar PROPERTIES C_STANDARD 90)
-SET_TARGET_PROPERTIES(libgit2_clar PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${libgit2_BINARY_DIR})
+SET_TARGET_PROPERTIES(libgit2_tests PROPERTIES C_STANDARD 90)
+SET_TARGET_PROPERTIES(libgit2_tests PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${libgit2_BINARY_DIR})
-TARGET_INCLUDE_DIRECTORIES(libgit2_clar PRIVATE ../src PUBLIC ../include)
-TARGET_LINK_LIBRARIES(libgit2_clar ${LIBGIT2_LIBS})
-IDE_SPLIT_SOURCES(libgit2_clar)
+TARGET_INCLUDE_DIRECTORIES(libgit2_tests PRIVATE ../src PUBLIC ../include)
+TARGET_LINK_LIBRARIES(libgit2_tests ${LIBGIT2_LIBS})
+IDE_SPLIT_SOURCES(libgit2_tests)
IF (MSVC_IDE)
# Precompiled headers
- SET_TARGET_PROPERTIES(libgit2_clar PROPERTIES COMPILE_FLAGS "/Yuprecompiled.h /FIprecompiled.h")
+ SET_TARGET_PROPERTIES(libgit2_tests PROPERTIES COMPILE_FLAGS "/Yuprecompiled.h /FIprecompiled.h")
SET_SOURCE_FILES_PROPERTIES("precompiled.c" COMPILE_FLAGS "/Ycprecompiled.h")
ENDIF ()
FUNCTION(ADD_CLAR_TEST name)
IF (NOT USE_LEAK_CHECKER STREQUAL "OFF")
- ADD_TEST(${name} "${libgit2_SOURCE_DIR}/script/${USE_LEAK_CHECKER}.sh" "${libgit2_BINARY_DIR}/libgit2_clar" ${ARGN})
+ ADD_TEST(${name} "${libgit2_SOURCE_DIR}/script/${USE_LEAK_CHECKER}.sh" "${libgit2_BINARY_DIR}/libgit2_tests" ${ARGN})
ELSE()
- ADD_TEST(${name} "${libgit2_BINARY_DIR}/libgit2_clar" ${ARGN})
+ ADD_TEST(${name} "${libgit2_BINARY_DIR}/libgit2_tests" ${ARGN})
ENDIF()
ENDFUNCTION(ADD_CLAR_TEST)
diff --git a/tests/README.md b/tests/README.md
index b1d70d3..7684a6e 100644
--- a/tests/README.md
+++ b/tests/README.md
@@ -11,7 +11,7 @@ https://github.com/vmg/clar
* Make sure you actually build the tests by setting:
- cmake -DBUILD_CLAR=ON build/
+ cmake -DBUILD_TESTS=ON build/
* Test:
@@ -32,7 +32,7 @@ These are automatically run as part of CI, but if you want to check locally:
Uses [`valgrind`](http://www.valgrind.org/):
```console
-$ cmake -DBUILD_CLAR=ON -DVALGRIND=ON ..
+$ cmake -DBUILD_TESTS=ON -DVALGRIND=ON ..
$ cmake --build .
$ valgrind --leak-check=full --show-reachable=yes --num-callers=50 --suppressions=../libgit2_clar.supp \
./libgit2_clar