Files
libgit2/tests
Patrick Steinhardt 0cf9b6668c tests: merge: fix printf formatter on 32 bit arches
We currently use `PRIuMAX` to print an integer of type `size_t` in
merge::trees::rename::cache_recomputation. While this works just fine on
64 bit arches, it doesn't on 32 bit ones. As a result, our nightly
builds on x86 and arm32 fail.

Fix the issue by using `PRIuZ` instead.
2020-05-12 11:41:44 +02:00
..
2019-10-22 10:23:24 -04:00
2020-02-07 11:53:51 +01:00
2020-02-07 11:53:51 +01:00
2020-02-07 11:53:51 +01:00
2020-02-07 11:53:51 +01:00
2020-02-07 11:53:51 +01:00
2020-01-15 13:55:58 -08:00
2018-03-19 16:08:01 -07:00
2019-06-24 14:58:40 +01:00
2020-01-24 10:39:56 -06:00
2019-07-18 14:29:43 +02:00
2019-06-12 00:05:46 +01:00

Writing Clar tests for libgit2

For information on the Clar testing framework and a detailed introduction please visit:

https://github.com/vmg/clar

  • Write your modules and tests. Use good, meaningful names.

  • Make sure you actually build the tests by setting:

      cmake -DBUILD_CLAR=ON build/
    
  • Test:

      ./build/libgit2_clar
    
  • Make sure everything is fine.

  • Send your pull request. That's it.

Memory leak checks

These are automatically run as part of CI, but if you want to check locally:

Linux

Uses valgrind:

$ cmake -DBUILD_CLAR=ON -DVALGRIND=ON ..
$ cmake --build .
$ valgrind --leak-check=full --show-reachable=yes --num-callers=50 --suppressions=../libgit2_clar.supp \
  ./libgit2_clar

macOS

Uses leaks, which requires XCode installed:

$ MallocStackLogging=1 MallocScribble=1 MallocLogFile=/dev/null CLAR_AT_EXIT="leaks -quiet \$PPID" \
  ./libgit2_clar