Files
libgit2/tests
Carlos Martín Nieto bbcadbbcd8 tests: move online::clone::ssh_auth_methods into the ssh test suite
We're currently running it as part of the online suite but that doesn't have any
setup for ssh so we won't find the GitHub keys we set up during the test.

It doesn't need the private key setup as we just want to make sure we see some
auth request from the server, but with the addition of hostkey checking we're
now seeing it fail when we skip these tests.
2023-01-18 21:36:10 +00:00
..
2022-01-05 16:35:52 +02:00
2022-01-17 21:39:35 -05:00
2022-02-06 15:08:35 -05:00
2022-01-05 16:35:52 +02:00
2022-01-05 16:35:52 +02:00
2021-11-11 17:31:43 -05:00
2022-01-05 16:35:52 +02:00
2022-01-05 16:35:52 +02:00
2018-03-19 16:08:01 -07:00
2022-01-05 16:35:52 +02:00
2022-04-12 09:06:01 -04:00
2021-10-28 10:25:09 +02: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_TESTS=ON build/
    
  • Test:

      ./build/libgit2_tests
    
  • 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_TESTS=ON -DVALGRIND=ON ..
$ cmake --build .
$ valgrind --leak-check=full --show-reachable=yes --num-callers=50 --suppressions=../libgit2_tests.supp \
  ./libgit2_tests

macOS

Uses leaks, which requires XCode installed:

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