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.