diff options
author | Edward Thomson <ethomson@edwardthomson.com> | 2017-11-12 14:47:11 +0000 |
---|---|---|
committer | Edward Thomson <ethomson@edwardthomson.com> | 2017-11-24 22:24:43 +0000 |
commit | c5d8682fad389473ae931250ef352acd17e0d520 (patch) | |
tree | 30f556a57c0063bde50c0277bb5d255fd4e2a0b4 /README.md | |
parent | 9e91a989f81f1f80b551c2398cfa9739e6740b0a (diff) | |
download | libgit2-c5d8682fad389473ae931250ef352acd17e0d520.tar.gz |
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.
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 23 |
1 files changed, 23 insertions, 0 deletions
@@ -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: |