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

Re: [PATCH 3/4] t5510: ensure we stay in the toplevel test dir

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 1, 2012, 21:57 UTC
Message-ID
<7vipiokmrz.fsf@alter.siamese.dyndns.org>
In-Reply-To
<80204781996b200d08b73cf61fa50df468e4b51d.1330637923.git.trast@student.ethz.ch>
Thomas Rast <trast@student.ethz.ch> writes:
> The last test descended into a subdir without ever re-emerging, which
> is not so nice to the next test writer.

True. Making the test suite more robust like this patch does is very much appreciated.

Is there a reason why we shouldn't be sticking to the more usual
	mkdir dups &&
        (
        	cd dups &&
                do whatever in dups
	)
pattern?
Show 17 quoted lines
> Signed-off-by: Thomas Rast <trast@student.ethz.ch>
> ---
>  t/t5510-fetch.sh |    1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/t/t5510-fetch.sh b/t/t5510-fetch.sh
> index 8827828..dd035bf 100755
> --- a/t/t5510-fetch.sh
> +++ b/t/t5510-fetch.sh
> @@ -431,6 +431,7 @@ test_expect_success 'fetch --dry-run' '
>  test_expect_success "should be able to fetch with duplicate refspecs" '
>  	mkdir dups &&
>  	cd dups &&
> +	test_when_finished "cd .." &&
>  	git init &&
>  	git config branch.master.remote three &&
>  	git config remote.three.url ../three/.git &&
Previous: Thomas RastNext: Thomas Rast
Message 5 of 11 in “Another bundle fix: reading freed memory”
  1. 0/4 Another bundle fix: reading freed memoryThomas Rast, Mar 1, 2012
  2. 1/4 t5510: refactor bundle->pack conversionThomas Rast, Mar 1, 2012
  3. 2/4 t5510: fix indent with spacesThomas Rast, Mar 1, 2012
  4. 3/4 t5510: ensure we stay in the toplevel test dirThomas Rast, Mar 1, 2012
  5. Junio C HamanoMar 1, 2012
  6. Thomas RastMar 1, 2012
  7. Junio C HamanoMar 1, 2012
  8. Junio C HamanoMar 1, 2012
  9. 4/4 bundle: keep around names passed to add_pending_object()Thomas Rast, Mar 1, 2012
  10. Junio C HamanoMar 1, 2012
  11. Thomas RastMar 1, 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.