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

Re: [PATCH] ci: avoid running the test suite _twice_

From
Jeff King <peff@peff.net>
Date
Nov 13, 2023, 18:49 UTC
Message-ID
<20231113184909.GB3838361@coredump.intra.peff.net>
In-Reply-To
<pull.1613.git.1699894837844.gitgitgadget@gmail.com>
On Mon, Nov 13, 2023 at 05:00:37PM +0000, Johannes Schindelin via GitGitGadget wrote:
> This is a late amendment of 19ec39aab54 (ci: stop linking the `prove`
> cache, 2022-07-10), fixing a bug that had been hidden so far.

We don't seem to have that commit in Junio's tree; it is only in git-for-windows.

Not that we should not fix things if they are broken, but I am trying to understand if git/git is experiencing the same bug. It sounds like not yet, though from looking at 19ec39aab54, I would expect to get these doubled runs any time we store the prove state. But maybe without that commit our state-file symlink is going somewhere invalid, and prove fails to actually store anything?

Show 12 quoted lines
> But starting with that commit, we run `prove` _twice_ in CI, and with
> completely different sets of tests to run. Due to the bug, the second
> invocation re-runs all of the tests that were already run as part of the
> first invocation. This not only wastes build minutes, it also frequently
> causes the `osx-*` jobs to fail because they already take a long time
> and now are likely to run into a timeout.
> 
> The worst part about it is that there is actually no benefit to keep
> running with `--state=slow,save`, ever since we decided no longer to
> try to reuse the Prove cache between CI runs.
> 
> So let's just drop that Prove option and live happily ever after.

Yes, I think this is the right thing to do regardless. If we are not saving the state to use between two related runs, there is no point storing it in the first place.

I do have to wonder, though, as somebody who did not follow the unit-test topic closely: why are the unit tests totally separate from the rest of the suite? I would think we'd want them run from one or more t/t*.sh scripts. That would make bugs like this impossible, but also:

  1. They'd be run via "make test", so developers don't have to remember
     to run them separately.
  2. They can be run in parallel with all of the other tests when using
     "prove -j", etc.
-Peff
Previous: Johannes Schindelin via GitGitGadgetNext: Junio C Hamano
Message 2 of 12 in “ci: avoid running the test suite _twice_”
  1. ci: avoid running the test suite _twice_Johannes Schindelin via GitGitGadget, Nov 13, 2023
  2. Jeff KingNov 13, 2023
  3. Junio C HamanoNov 13, 2023
  4. Josh SteadmonNov 14, 2023
  5. Junio C HamanoNov 15, 2023
  6. Josh SteadmonNov 15, 2023
  7. Feasibility of folding `unit-tests` into `make test`, was Re: [PATCH] ci: avoid running the test suite _twice_Johannes Schindelin, Nov 16, 2023
  8. phillip.wood123@gmail.comNov 16, 2023
  9. Josh SteadmonJan 4, 2024
  10. Jeff KingNov 16, 2023
  11. ci: avoid running the test suite _twice_Johannes Schindelin via GitGitGadget, Nov 13, 2023
  12. Junio C HamanoNov 14, 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.