• Show log

    Commit

  • Hash : 35087f0e
    Author : Patrick Steinhardt
    Date : 2017-06-28T15:42:54

    cmake: create separate CMakeLists.txt for tests
    
    Our CMakeLists.txt is very unwieldy in its current size, spanning more
    than 700 lines of code. Furthermore, it has several issues regarding
    scoping, where for example some defines, includes, etc. from our test
    suite are also applied to our normal library code.
    
    To fix this, we can separate out build instructions for our tests and
    move them into their own CMakeLists.txt in the "tests" directory. This
    reduced complexity of the root CMakeLists.txt file and fixes the issues
    regarding leaking build context from tests into the library.
    

  • README.md

  • 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.