git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] Add option --path to allow to run tests with real systems
Date: Wed, 05 Dec 2007 11:32:56 -0800	[thread overview]
Message-ID: <7v3auhq6mv.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <20071205134522.GA24617@laptop> (Nguyễn Thái Ngọc Duy's message of "Wed, 5 Dec 2007 20:45:22 +0700")

Nguyễn Thái Ngọc Duy <pclouds@gmail.com> writes:

> 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.

  reply	other threads:[~2007-12-05 19:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-05 13:45 [PATCH] Add option --path to allow to run tests with real systems Nguyễn Thái Ngọc Duy
2007-12-05 19:32 ` Junio C Hamano [this message]
2007-12-06 13:48   ` [PATCH] 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
2007-12-06 15:23     ` Johannes Schindelin
     [not found]       ` <fcaeb9bf0712060732r70d07135lf6a01ae2410a0ada@mail.gmail.com>
2007-12-06 15:50         ` Johannes Schindelin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7v3auhq6mv.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=pclouds@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).