1. 13 Jun, 2019 1 commit
    • http-parser: use our bundled http-parser by default · fb529a01
      Our bundled http-parser includes bugfixes, therefore we should prefer
      our http-parser until such time as we can identify that the system
      http-parser has these bugfixes (using a version check).
      
      Since these bugs are - at present - minor, retain the ability for users
      to force that they want to use the system http-parser anyway.  This does
      change the cmake specification so that people _must_ opt-in to the new
      behavior knowingly.
      Edward Thomson committed
  2. 11 Jun, 2019 6 commits
  3. 10 Jun, 2019 30 commits
  4. 07 Jun, 2019 3 commits
    • tests: checkout: fix symlink.git being created outside of sandbox · cb28df20
      The function `populate_symlink_workdir` creates a new
      "symlink.git" repository with a relative path "../symlink.git".
      As the current working directory is the sandbox, the new
      repository will be created just outside of the sandbox.
      
      Fix this by using `clar_sandbox_path`.
      Patrick Steinhardt committed
    • tests: object: consolidate cache tests · 1f47efc4
      The object::cache test module has two tests that do nearly the
      same thing: given a cache limit, load a certain set of objects
      and verify if those objects have been cached or not.
      
      Convert those tests to the new data-driven initializers to
      demonstrate how these are to be used. Furthermore, add some
      additional test data. This conversion is mainly done to show this
      new facility.
      Patrick Steinhardt committed
    • tests: allow for simple data-driven tests · 394951ad
      Right now, we're not able to use data-driven tests at all. E.g.
      given a set of tests which we'd like to repeat with different
      test data, one has to hand-write any outer loop that iterates
      over the test data and then call each of the test functions. Next
      to being bothersome, this also has the downside that error
      reporting is quite lacking, as one never knows which test data
      actually produced failures.
      
      So let's implement the ability to re-run complete test modules
      with changing test data. To retain backwards compatibility and
      enable trivial addition of new runs with changed test data, we
      simply extend clar's generate.py. Instead of scanning for a
      single `_initialize` function, each test module may now implement
      multiple `_initialize_foo` functions. The generated test harness
      will then run all test functions for each of the provided
      initializer functions, making it possible to provide different
      test data inside of each of the initializer functions. Example:
      
      ```
      void test_git_example__initialize_with_nonbare_repo(void)
      {
      	g_repo = cl_git_sandbox_init("testrepo");
      }
      
      void test_git_example__initialize_with_bare_repo(void)
      {
      	g_repo = cl_git_sandbox_init("testrepo.git");
      }
      
      void test_git_example__cleanup(void)
      {
      	cl_git_sandbox_cleanup();
      }
      
      void test_git_example__test1(void)
      {
      	test1();
      }
      
      void test_git_example__test2(void)
      {
      	test2();
      }
      ```
      
      Executing this test module will cause the following output:
      
      ```
      $ ./libgit2_clar -sgit::example
      git::example (with nonbare repo)..
      git::example (with bare repo)..
      ```
      Patrick Steinhardt committed