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

Re: [PATCH] test-lib: add ability to cap the runtime of tests

From
Stefan Beller <sbeller@google.com>
Date
Jun 5, 2017, 19:03 UTC
Message-ID
<CAGZ79kZn+bjtqBYTWuYqfsKdA=eWreNHQPCLVDGiS_8977VcTA@mail.gmail.com>
In-Reply-To
<CACBZZX5FP_jxXaT+NW8g2JqH89iYajHPjHhxCj=_vWnkxZ=rYQ@mail.gmail.com>
Show 12 quoted lines
> That's never going to be a problem on a less beefy machine with
> --state=slow,save, since the 30s test is going to be long over by the
> time the rest of the tests run.
>
> Cutting down on these long tail tests allows me to e.g. replace this:
>
>     git rebase -i --exec '(make -j56 all && cd t && prove -j56 <some
> limited glob>)'
>
> With a glob that runs the entire test suite, with the rebase only
> taking marginally longer in most cases while getting much better test
> coverage than I'd otherwise bother with.
I wonder if this functionality is rather best put into prove?

Also prove doesn't know which tests are "interesting", e.g. if you were working on interactive rebase, then you really want the longest test to be run in full?

And this "judge by time, not by interest" doesn't bode well with me.

I have a non-beefy machine such that this particular problem doesn't apply to me, but instead the whole test suite takes just long to run.

For that I reduce testing intelligently, i.e. I know where I am working on, so I run only some given tests (in case of submodules I'd go with "prove t74*") which would also fix your issue IIUC?

Previous: Ævar Arnfjörð BjarmasonNext: Ævar Arnfjörð Bjarmason
Message 11 of 12 in “test-lib: add ability to cap the runtime of tests”
  1. test-lib: add ability to cap the runtime of testsÆvar Arnfjörð Bjarmason, Jun 3, 2017
  2. Junio C HamanoJun 4, 2017
  3. Ævar Arnfjörð BjarmasonJun 4, 2017
  4. Junio C HamanoJun 5, 2017
  5. Christian CouderJun 5, 2017
  6. Stefan BellerJun 5, 2017
  7. Jeff KingJun 7, 2017
  8. Ramsay JonesJun 8, 2017
  9. Lars SchneiderJun 5, 2017
  10. Ævar Arnfjörð BjarmasonJun 5, 2017
  11. Stefan BellerJun 5, 2017
  12. Ævar Arnfjörð BjarmasonJun 5, 2017

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.