1 Writing Clar tests for libgit2
2 ==============================
4 For information on the Clar testing framework and a detailed introduction
7 https://github.com/vmg/clar
10 * Write your modules and tests. Use good, meaningful names.
12 * Make sure you actually build the tests by setting:
14 cmake -DBUILD_CLAR=ON build/
20 * Make sure everything is fine.
22 * Send your pull request. That's it.
28 These are automatically run as part of CI, but if you want to check locally:
32 Uses [`valgrind`](http://www.valgrind.org/):
35 $ cmake -DBUILD_CLAR=ON -DVALGRIND=ON ..
37 $ valgrind --leak-check=full --show-reachable=yes --num-callers=50 --suppressions=../libgit2_clar.supp \
43 Uses [`leaks`](https://developer.apple.com/library/archive/documentation/Performance/Conceptual/ManagingMemory/Articles/FindingLeaks.html), which requires XCode installed:
46 $ MallocStackLogging=1 MallocScribble=1 MallocLogFile=/dev/null CLAR_AT_EXIT="leaks -quiet \$PPID" \