Commit c5d8682f by Edward Thomson

README: clarify why one would run libgit2_clar

Since we recommend `ctest -V`, it's not clear why somebody would want to
run `libgit2_clar`.  Indicate that it's helpful when running individual
tests or suites.
parent 9e91a989
......@@ -142,6 +142,9 @@ and internal API/coding conventions we use.
Building libgit2 - Using CMake
==============================
Building
--------
`libgit2` builds cleanly on most platforms without any external dependencies.
Under Unix-like systems, like Linux, \*BSD and Mac OS X, libgit2 expects `pthreads` to be available;
they should be installed by default on all systems. Under Windows, libgit2 uses the native Windows API
......@@ -157,6 +160,9 @@ On most systems you can build the library using the following commands
Alternatively you can point the CMake GUI tool to the CMakeLists.txt file and generate platform specific build project or IDE workspace.
Running Tests
-------------
Once built, you can run the tests from the `build` directory with the command
$ ctest -V
......@@ -165,11 +171,28 @@ Alternatively you can run the test suite directly using,
$ ./libgit2_clar
Invoking the test suite directly is useful because it allows you to execute
individual tests, or groups of tests using the `-s` flag. For example, to
run the index tests:
$ ./libgit2_clar -sindex
To run a single test named `index::racy::diff`, which corresponds to the test
function (`test_index_racy__diff`)[https://github.com/libgit2/libgit2/blob/master/tests/index/racy.c#L23]:
$ ./libgit2_clar -sindex::racy::diff
Installation
------------
To install the library you can specify the install prefix by setting:
$ cmake .. -DCMAKE_INSTALL_PREFIX=/install/prefix
$ cmake --build . --target install
Advanced Usage
--------------
For more advanced use or questions about CMake please read <https://cmake.org/Wiki/CMake_FAQ>.
The following CMake variables are declared:
......
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