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

Re: [PATCH 1/2] t0303: set reason for skipping tests

From
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Date
Mar 14, 2012, 14:14 UTC
Message-ID
<20120314141401.GC28595@in.waw.pl>
In-Reply-To
<20120313215331.GC27752@sigill.intra.peff.net>
On Tue, Mar 13, 2012 at 05:53:32PM -0400, Jeff King wrote:
> The reason is that the individual tests do not verify all of the
> preconditions themselves, but rather build on each other.
Right. I added a note based on this sentence in the test description.
Show 13 quoted lines
> In an ideal world, each test snippet would be totally independent and
> check its preconditions. That would give us an accurate count of how
> many tests actually passed or failed. But fundamentally we only care
> about "did they all succeed or not?", which the current script does tell
> us (either test 2 fails, or if it succeeds, then we have checked the
> precondition for test 4). And the tests end up way shorter, because we
> don't repeat the preconditions over and over.
> 
> If you want to try to make the tests more robust, you can (for example,
> you can tighten the precondition on 4 to check "does it give the right
> answer with the right protocol" instead of just "does it ever give us
> the right answer"). But personally, I'm not sure it's worth that much
> effort.
Yeah.
Show 11 quoted lines
> > >Should they actually say "# SKIP ..." to tell prove what's going on? I
> > >don't know very much about TAP.
> > # SKIP is used when skipping individual tests (IIUC), but when we
> > skip a group of tests, we simply jump over them and this message is
> > purely informative output that is not interpreted by the harness.
> 
> Just looking at test-lib.sh, it seems like we output "# SKIP" when we do
> skip_all. But I think you would have to give a count of which tests you
> skipped (e.g., try "./t5541-http-push.sh" to see its TAP output). Which
> means when skipping a subset, you'd have to deal with test numbering,
> which is a pain. So it's probably not worth worrying about.

Skipped test numbering could done automatically by using test prereqs, but (after actually doing that and discarding) I agree that it isn't worth the trouble.

Jonathan Nieder wrote:
> Nice idea, but shouldn't this description be in test_description so I
> can view it by running "sh t0303-credential-external.sh --help"?
Done.
Updated patches follow.

(This time I tested with GIT_TEST_CREDENTIAL_HELPER=cache GIT_TEST_CREDENTIAL_HELPER_TIMEOUT="cache --timeout=1,3" and things seem to work as expected.)

Zbyszek
Previous: Jeff KingNext: Zbigniew Jędrzejewski-Szmek
Message 6 of 23 in “prettify t0303-credential-helpers.sh”
  1. 0/2 prettify t0303-credential-helpers.shZbigniew Jędrzejewski-Szmek, Mar 12, 2012
  2. 1/2 t0303: set reason for skipping testsZbigniew Jędrzejewski-Szmek, Mar 12, 2012
  3. Jeff KingMar 12, 2012
  4. Zbigniew Jędrzejewski-SzmekMar 12, 2012
  5. Jeff KingMar 13, 2012
  6. Zbigniew Jędrzejewski-SzmekMar 14, 2012
  7. 1/2 t0303: immediately bail out w/o GIT_TEST_CREDENTIAL_HELPERZbigniew Jędrzejewski-Szmek, Mar 14, 2012
  8. 2/2 t0303: resurrect commit message as test documentationZbigniew Jędrzejewski-Szmek, Mar 14, 2012
  9. Junio C HamanoMar 14, 2012
  10. Jeff KingMar 15, 2012
  11. Junio C HamanoMar 15, 2012
  12. Zbigniew Jędrzejewski-SzmekMar 15, 2012
  13. 1/2 t0303: immediately bail out w/o GIT_TEST_CREDENTIAL_HELPERZbigniew Jędrzejewski-Szmek, Mar 15, 2012
  14. 2/2 t0303: resurrect commit message as test documentationZbigniew Jędrzejewski-Szmek, Mar 15, 2012
  15. Junio C HamanoMar 15, 2012
  16. Jeff KingMar 15, 2012
  17. Jeff KingMar 15, 2012
  18. Junio C HamanoMar 15, 2012
  19. Jeff KingMar 15, 2012
  20. 2/2 t0303: resurrect commit message as test documentationZbigniew Jędrzejewski-Szmek, Mar 12, 2012
  21. Jeff KingMar 12, 2012
  22. Jonathan NiederMar 12, 2012
  23. Jeff KingMar 13, 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.