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

Re: [PATCH] t1500-rev-parse: rewrite each test to run in isolation

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 13, 2016, 02:03 UTC
Message-ID
<xmqqk2k2l0yx.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<1460200767-32864-2-git-send-email-rappazzo@gmail.com>
Michael Rappazzo <rappazzo@gmail.com> writes:
Show 10 quoted lines
> t1500-rev-parse has many tests which change directories and leak
> environment variables.  This makes it difficult to add new tests without
> minding the environment variables and current directory.
>
> Each test is now setup, executed, and cleaned up without leaving anything
> behind.  Tests which have textual expectations have been converted to use
> test_cmp (which will show a diff when the test is run with --verbose).
>
> Signed-off-by: Michael Rappazzo <rappazzo@gmail.com>
> ---

Applying this patch on top of sg/completion-updates topic makes the tests much more readable. Given that sg/completion-updates topic is planned to be rerolled ($gmane/287839), I think it would be better to do this as a preparatory clean-up patch before it makes the tests uglier by doing "add --absolute-git-dir" patch in the middle.

Gábor, what do you think?
Previous: Michael RappazzoNext: SZEDER Gábor
Message 3 of 7 in “rewrite t1500-rev-parse.sh”
  1. rewrite t1500-rev-parse.shMichael Rappazzo, Apr 9, 2016
  2. t1500-rev-parse: rewrite each test to run in isolationMichael Rappazzo, Apr 9, 2016
  3. Junio C HamanoApr 13, 2016
  4. SZEDER GáborApr 16, 2016
  5. Eric SunshineApr 13, 2016
  6. Mike RappazzoApr 13, 2016
  7. Jeff KingApr 13, 2016

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.