Skip to content

Commit a89db0e

Browse files
author
Edward Thomson
authored
Merge pull request libgit2#6083 from libgit2/ethomson/clar_no_more
2 parents e61abdc + 4e14d4c commit a89db0e

File tree

6 files changed

+19
-19
lines changed

6 files changed

+19
-19
lines changed

CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ INCLUDE(EnableWarnings)
3838
OPTION(SONAME "Set the (SO)VERSION of the target" ON)
3939
OPTION(BUILD_SHARED_LIBS "Build Shared Library (OFF for Static)" ON)
4040
OPTION(THREADSAFE "Build libgit2 as threadsafe" ON)
41-
OPTION(BUILD_CLAR "Build Tests using the Clar suite" ON)
41+
OPTION(BUILD_TESTS "Build Tests using the Clar suite" ON)
4242
OPTION(BUILD_EXAMPLES "Build library usage example apps" OFF)
4343
OPTION(BUILD_FUZZERS "Build the fuzz targets" OFF)
4444
OPTION(ENABLE_TRACE "Enables tracing support" ON)
@@ -281,7 +281,7 @@ IF (NOT MSVC)
281281
ENDIF()
282282
ENDIF ()
283283

284-
IF (BUILD_CLAR)
284+
IF (BUILD_TESTS)
285285
ENABLE_TESTING()
286286
ADD_SUBDIRECTORY(tests)
287287
ENDIF ()
@@ -295,7 +295,7 @@ IF(BUILD_FUZZERS)
295295
IF(BUILD_EXAMPLES)
296296
MESSAGE(FATAL_ERROR "Cannot build the fuzzer targets and the examples together")
297297
ENDIF()
298-
IF(BUILD_CLAR)
298+
IF(BUILD_TESTS)
299299
MESSAGE(FATAL_ERROR "Cannot build the fuzzer targets and the tests together")
300300
ENDIF()
301301
ENDIF()

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ The following CMake variables are declared:
278278
- `CMAKE_INSTALL_LIBDIR`: Where to install libraries to.
279279
- `CMAKE_INSTALL_INCLUDEDIR`: Where to install headers to.
280280
- `BUILD_SHARED_LIBS`: Build libgit2 as a Shared Library (defaults to ON)
281-
- `BUILD_CLAR`: Build [Clar](https://github.com/vmg/clar)-based test suite (defaults to ON)
281+
- `BUILD_TESTS`: Build the unit and integration test suites (defaults to ON)
282282
- `THREADSAFE`: Build libgit2 with threading support (defaults to ON)
283283

284284
To list all build options and their current value, you can do the

docs/fuzzing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ automated fuzz testing. libFuzzer only works with clang.
1919
and [`leak`/`address,leak`](https://clang.llvm.org/docs/LeakSanitizer.html).
2020
3. Create the cmake build environment and configure the build with the
2121
sanitizer chosen: `CC=/usr/bin/clang-6.0 CFLAGS="-fsanitize=address" cmake
22-
-DBUILD_CLAR=OFF -DBUILD_FUZZERS=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo ..`.
22+
-DBUILD_TESTS=OFF -DBUILD_FUZZERS=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo ..`.
2323
Note that building the fuzzer targets is incompatible with the
2424
tests and examples.
2525
4. Build libgit2: `cmake --build .`

fuzzers/corpora/objects/blob

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ slack channel once you've registered.
6464

6565
If you have questions about the library, please be sure to check out the
6666
[API documentation](http://libgit2.github.com/libgit2/). If you still have
67-
questions, reach out to us on Slack or post a question on
67+
questions, reach out to us on Slack or post a question on
6868
[StackOverflow](http://stackoverflow.com/questions/tagged/libgit2) (with the `libgit2` tag).
6969

7070
**Reporting Bugs**
@@ -229,7 +229,7 @@ The following CMake variables are declared:
229229
- `LIB_INSTALL_DIR`: Where to install libraries to.
230230
- `INCLUDE_INSTALL_DIR`: Where to install headers to.
231231
- `BUILD_SHARED_LIBS`: Build libgit2 as a Shared Library (defaults to ON)
232-
- `BUILD_CLAR`: Build [Clar](https://github.com/vmg/clar)-based test suite (defaults to ON)
232+
- `BUILD_TESTS`: Build [Clar](https://github.com/vmg/clar)-based test suite (defaults to ON)
233233
- `THREADSAFE`: Build libgit2 with threading support (defaults to ON)
234234
- `STDCALL`: Build libgit2 as `stdcall`. Turn off for `cdecl` (Windows; defaults to ON)
235235

tests/CMakeLists.txt

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ FIND_PACKAGE(PythonInterp)
33

44
IF(NOT PYTHONINTERP_FOUND)
55
MESSAGE(FATAL_ERROR "Could not find a python interpeter, which is needed to build the tests. "
6-
"Make sure python is available, or pass -DBUILD_CLAR=OFF to skip building the tests")
6+
"Make sure python is available, or pass -DBUILD_TESTS=OFF to skip building the tests")
77
ENDIF()
88

99
SET(CLAR_FIXTURES "${CMAKE_CURRENT_SOURCE_DIR}/resources/")
@@ -39,26 +39,26 @@ SET_SOURCE_FILES_PROPERTIES(
3939
INCLUDE_DIRECTORIES(${LIBGIT2_INCLUDES})
4040
INCLUDE_DIRECTORIES(SYSTEM ${LIBGIT2_SYSTEM_INCLUDES})
4141

42-
ADD_EXECUTABLE(libgit2_clar ${SRC_CLAR} ${SRC_TEST} ${LIBGIT2_OBJECTS})
42+
ADD_EXECUTABLE(libgit2_tests ${SRC_CLAR} ${SRC_TEST} ${LIBGIT2_OBJECTS})
4343

44-
SET_TARGET_PROPERTIES(libgit2_clar PROPERTIES C_STANDARD 90)
45-
SET_TARGET_PROPERTIES(libgit2_clar PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${libgit2_BINARY_DIR})
44+
SET_TARGET_PROPERTIES(libgit2_tests PROPERTIES C_STANDARD 90)
45+
SET_TARGET_PROPERTIES(libgit2_tests PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${libgit2_BINARY_DIR})
4646

47-
TARGET_INCLUDE_DIRECTORIES(libgit2_clar PRIVATE ../src PUBLIC ../include)
48-
TARGET_LINK_LIBRARIES(libgit2_clar ${LIBGIT2_LIBS})
49-
IDE_SPLIT_SOURCES(libgit2_clar)
47+
TARGET_INCLUDE_DIRECTORIES(libgit2_tests PRIVATE ../src PUBLIC ../include)
48+
TARGET_LINK_LIBRARIES(libgit2_tests ${LIBGIT2_LIBS})
49+
IDE_SPLIT_SOURCES(libgit2_tests)
5050

5151
IF (MSVC_IDE)
5252
# Precompiled headers
53-
SET_TARGET_PROPERTIES(libgit2_clar PROPERTIES COMPILE_FLAGS "/Yuprecompiled.h /FIprecompiled.h")
53+
SET_TARGET_PROPERTIES(libgit2_tests PROPERTIES COMPILE_FLAGS "/Yuprecompiled.h /FIprecompiled.h")
5454
SET_SOURCE_FILES_PROPERTIES("precompiled.c" COMPILE_FLAGS "/Ycprecompiled.h")
5555
ENDIF ()
5656

5757
FUNCTION(ADD_CLAR_TEST name)
5858
IF (NOT USE_LEAK_CHECKER STREQUAL "OFF")
59-
ADD_TEST(${name} "${libgit2_SOURCE_DIR}/script/${USE_LEAK_CHECKER}.sh" "${libgit2_BINARY_DIR}/libgit2_clar" ${ARGN})
59+
ADD_TEST(${name} "${libgit2_SOURCE_DIR}/script/${USE_LEAK_CHECKER}.sh" "${libgit2_BINARY_DIR}/libgit2_tests" ${ARGN})
6060
ELSE()
61-
ADD_TEST(${name} "${libgit2_BINARY_DIR}/libgit2_clar" ${ARGN})
61+
ADD_TEST(${name} "${libgit2_BINARY_DIR}/libgit2_tests" ${ARGN})
6262
ENDIF()
6363
ENDFUNCTION(ADD_CLAR_TEST)
6464

tests/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ https://github.com/vmg/clar
1111

1212
* Make sure you actually build the tests by setting:
1313

14-
cmake -DBUILD_CLAR=ON build/
14+
cmake -DBUILD_TESTS=ON build/
1515

1616
* Test:
1717

@@ -32,7 +32,7 @@ These are automatically run as part of CI, but if you want to check locally:
3232
Uses [`valgrind`](http://www.valgrind.org/):
3333

3434
```console
35-
$ cmake -DBUILD_CLAR=ON -DVALGRIND=ON ..
35+
$ cmake -DBUILD_TESTS=ON -DVALGRIND=ON ..
3636
$ cmake --build .
3737
$ valgrind --leak-check=full --show-reachable=yes --num-callers=50 --suppressions=../libgit2_clar.supp \
3838
./libgit2_clar

0 commit comments

Comments
 (0)