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

Re: [PATCH] Add option --path to allow to run tests with real systems

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 5, 2007, 19:32 UTC
Message-ID
<7v3auhq6mv.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<20071205134522.GA24617@laptop>
Nguyễn Thái Ngọc Duy <pclouds@gmail.com> writes:
Show 24 quoted lines
> diff --git a/t/test-lib.sh b/t/test-lib.sh
> index 90b6844..50a3551 100644
> --- a/t/test-lib.sh
> +++ b/t/test-lib.sh
> @@ -84,6 +84,8 @@ do
>  	--no-python)
>  		# noop now...
>  		shift ;;
> +	--path=*)
> +		path="${1#*=}"; shift ;;
>  	*)
>  		break ;;
>  	esac
> @@ -296,11 +298,19 @@ test_done () {
>  
>  # Test the binaries we have just built.  The tests are kept in
>  # t/ subdirectory and are run in trash subdirectory.
> -PATH=$(pwd)/..:$PATH
> -GIT_EXEC_PATH=$(pwd)/..
> +if [ -n "$path" ]; then
> +	[ -x "$path/git" ] || error "git not found in $path"
> +	PATH="$path":$PATH
> +	export PATH
> +	GIT_EXEC_PATH="$(git --exec-path)"

This is wrong, isn't it? $path may point at the freshly built but not installed git executable, but it reports --exec-path the location that git-foo and friends are to be _eventually_ installed, not the location they are sitting after built, being tested, waiting to be installed.

Previous: Nguyễn Thái Ngọc DuyNext: Nguyễn Thái Ngọc Duy
Message 2 of 5 in “Add option --path to allow to run tests with real systems”
  1. Add option --path to allow to run tests with real systemsNguyễn Thái Ngọc Duy, Dec 5, 2007
  2. Junio C HamanoDec 5, 2007
  3. Add option --path to allow to run tests with real systems. You must install git before running this test.Nguyễn Thái Ngọc Duy, Dec 6, 2007
  4. Johannes SchindelinDec 6, 2007
  5. Johannes SchindelinDec 6, 2007

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.