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

Re: [PATCH 1/2] t3400: make test clean up after itself

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Feb 24, 2020, 09:19 UTC
Message-ID
<CAPig+cQBSCius8a2eDsyOZb3-p8nd-aNqgECgxM9+iTmBSGW5g@mail.gmail.com>
In-Reply-To
<20200223101407.77036-2-sunshine@sunshineco.com>
On Sun, Feb 23, 2020 at 5:15 AM Eric Sunshine <sunshine@sunshineco.com> wrote:
Show 17 quoted lines
> This test intentionally creates a file which causes rebase to fail, thus
> it is important that this file be deleted before subsequent tests are
> run which are not expecting such a failure. In the past, the common way
> to ensure cleanup (regardless of whether the test succeeded or failed)
> was either for the next test to perform the previous test's cleanup as
> its first step or to do the cleanup at global scope outside of any
> tests. With the introduction of 'test_when_finished', however, tests can
> be responsible for their own cleanup. Therefore, update this test to
> clean up after itself.
>
> A bit of history: This 'rm' invocation was moved from within the body of
> the following test to global scope by bffd750adf (rebase: improve error
> message when upstream argument is missing, 2010-05-31), which postdates,
> by about a month, introduction of 'test_when_finished' in 3bf7886705
> (test-lib: Let tests specify commands to be run at end of test,
> 2010-05-02).
> ---
Missing sign-off, so here it is:
Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Previous: Eric SunshineNext: Eric Sunshine
Message 4 of 5 in “git rebase allows branches to be checked out in multiple worktrees”
  1. Mike HommeyFeb 20, 2020
  2. 0/2 git-rebase: refuse to switch to branch checked out elsewhereEric Sunshine, Feb 23, 2020
  3. 1/2 t3400: make test clean up after itselfEric Sunshine, Feb 23, 2020
  4. Eric SunshineFeb 24, 2020
  5. 2/2 rebase: refuse to switch to branch already checked out elsewhereEric Sunshine, Feb 23, 2020

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.