git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [GSoC][PATCH] unit-tests: add tests for oidset.h

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 26, 2024, 15:46 UTC
Message-ID
<xmqqttf7mgmm.fsf@gitster.g>
In-Reply-To
<CAP8UFD2yTMNmx0n1jhOu7dz_4XeOyTy1iLmRWYmuf9QJf75hsQ@mail.gmail.com>
Christian Couder <christian.couder@gmail.com> writes:
Show 6 quoted lines
>> Add tests for oidset.h library, which were not previously present using
>> the unit testing framework.
>
> It might be interesting to also say if there are tests for oidset in
> the end-to-end tests, not just in the unit test framework. Also I
> think oidset.h is more an API than a library.
Thanks for pointing these out; 100% agreed.
>> This imposes a new restriction of running the test from the 't/' and
>> 't/unit-tests/bin'

I thought we just got rid of such an restriction during the review of another unit-test topic? If this is a recurring theme, perhaps we should teach t/unit-test/test-lib.c a few ways to specify where the auxiliary files for unit-tests are (e.g. "-d <datadir>" command line option, or $GIT_UNIT_TEST_DATA_DIR environment variable).

Even though the end-to-end tests do not allow you to start them from an arbitrary directory (it shouldn't be a rocket science to teach them to do so, though), they can run in an arbitrary place with the "--root" option without hindering its ability to read its auxiliary data files, because they can learn where the t/ directory is by looking at $TEST_DIRECTORY and a few other variables. A similar idea should be applicable to the unit-tests framework.

Thanks.
Previous: Christian CouderNext: Junio C Hamano
Message 4 of 10 in “unit-tests: add tests for oidset.h”
  1. Ghanshyam ThakkarAug 24, 2024
  2. Patrick SteinhardtAug 26, 2024
  3. Christian CouderAug 26, 2024
  4. Junio C HamanoAug 26, 2024
  5. Junio C HamanoSep 26, 2024
  6. howto-maintain-git: discarding inactive topicsJunio C Hamano, Sep 26, 2024
  7. Christian CouderSep 27, 2024
  8. Junio C HamanoSep 27, 2024
  9. Patrick SteinhardtSep 28, 2024
  10. Junio C HamanoSep 30, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.