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

Re: [RFC/PATCH 3/4] test-lib: provide lazy TIME_COMMAND prereq

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 16, 2012, 16:41 UTC
Message-ID
<7v8vb6tlne.fsf@alter.siamese.dyndns.org>
In-Reply-To
<0140f3f2f2f4bded6868f4082bef0c36e9a8560e.1350387132.git.git@drmicha.warpmail.net>
Michael J Gruber <git@drmicha.warpmail.net> writes:
> Some test want to use the time command (not the shell builtin) and test
> for its availability at /usr/bin/time.

As we have t/perf these days, I suspect that we should aim to remove these uses of /usr/bin/time in the main testsuite instead.

The one in 3419 was "run this command, and while at it run it under 'time'" but it is only inside test_debug and I do not think it gives anything more than curiosity values.

The one in 3302 is used to compare two runs (one without and one with notes tree), so it has a little more value than just curiosity, but its value inside the main test suite is still highly dubious. It does not have any "under this value the test passes" criteria.

When the performance of having to look up notes tree really matters, it shouldn't be done inside the main test suite that is designed to be runnable unattended and the only check the humans do is to see their "ok/fail" output.

In short, what you would get out of /usr/bin/time simply is not a good match inside the context of these unit tests.

Previous: Junio C HamanoNext: Michael J Gruber
Message 16 of 17 in “t3302-notes-index-expensive.sh and t3419-rebase-patch-id.sh need time in /usr/bin”
  1. Joachim SchmitzOct 15, 2012
  2. 0/4 Allow different time commandsMichael J Gruber, Oct 16, 2012
  3. 1/4 t3419-rebase-patch-id: heed USR_BIN_TIME prereqMichael J Gruber, Oct 16, 2012
  4. Junio C HamanoOct 16, 2012
  5. 2/4 test-lib: allow variable export from lazy prereq testsMichael J Gruber, Oct 16, 2012
  6. Junio C HamanoOct 16, 2012
  7. 3/4 test-lib: provide lazy TIME_COMMAND prereqMichael J Gruber, Oct 16, 2012
  8. Joachim SchmitzOct 16, 2012
  9. Michael J GruberOct 16, 2012
  10. Joachim SchmitzOct 16, 2012
  11. test-lib: provide lazy TIME_COMMAND prereqMichael J Gruber, Oct 16, 2012
  12. Andreas SchwabOct 16, 2012
  13. Stefano LattariniOct 16, 2012
  14. Johannes SixtOct 16, 2012
  15. Junio C HamanoOct 16, 2012
  16. Junio C HamanoOct 16, 2012
  17. 4/4 t3302,t3419: use the TIME_COMMAND prereqMichael J Gruber, Oct 16, 2012

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.