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

Re: [PATCH] test-lib: allow storing counts with test harnesses

From
Elijah Newren <newren@gmail.com>
Date
Apr 1, 2023, 18:56 UTC
Message-ID
<CABPp-BGBYUHeYtsyM-gYvr0CsKGAmJ1OKqcmnHiKYy0ps6NrCg@mail.gmail.com>
In-Reply-To
<20230304212220.qkzc2joco5xj7d4s@lucy.dinwoodie.org>
On Sat, Mar 4, 2023 at 2:16 PM Adam Dinwoodie <adam@dinwoodie.org> wrote:
Show 18 quoted lines
>
> Currently, test result files are only stored in test-results/*.counts if
> $HARNESS_ACTIVE is not set.  This dates from 8ef1abe550 (test-lib: Don't
> write test-results when HARNESS_ACTIVE, 2010-08-11), where the
> assumption was that if someone were using a test harness like prove,
> that would track results and the count files wouldn't be required.
> However, as of 49da404070 (test-lib: show missing prereq summary,
> 2021-11-20), those files also store the list of git test prerequisites
> that were missing during the test run, which isn't something that a
> generic test harness like prove can provide.
>
> To allow folk using test harnesses to access the lists of missing
> prerequisites, add a --counts argument to test-lib that will keep these
> counts files even if a test harness is in use.  This means that a
> subsequent call of, say, `make -C t aggregate-results` will report
> useful information.
>
> It might be preferable to do make a wider-ranging change, including
Replace "do make" with either "do" or "make"?
Show 14 quoted lines
> storing the missing prerequisites separately from the count files, so
> the results can be reported regardless of whether the success/failure
> counts are wanted, but that would be more disruptive and more work for
> relatively little gain.
>
> Signed-off-by: Adam Dinwoodie <adam@dinwoodie.org>
> ---
>
> I submitted this as an RFC back in December, and received no comments,
> so I'm submitting this as an actual patch now.  My key concern was the
> final paragraph above -- embedding using the "count" files for something
> other than counts -- but I've mostly convinced myself that refactoring
> this code to separate that out is unlikely to actually cause significant
> pain.

Actual code change looks fine to me as well, though I see Peff has pointed out we might not even need to make it an option.

Previous: Junio C Hamano
Message 5 of 5 in “test-lib: allow storing counts with test harnesses”
  1. test-lib: allow storing counts with test harnessesAdam Dinwoodie, Dec 24, 2022
  2. test-lib: allow storing counts with test harnessesAdam Dinwoodie, Mar 4, 2023
  3. Jeff KingMar 6, 2023
  4. Junio C HamanoMar 6, 2023
  5. Elijah NewrenApr 1, 2023

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.