# Problem in our test setup

4 messages from 2007-11-15 to 2007-11-15. Participants: Johannes Schindelin, Junio C Hamano.
Thread: https://gitlist.dev/t/10875

## Johannes Schindelin, 2007-11-15 06:24

Subject: Problem in our test setup
Message-ID: <Pine.LNX.4.64.0711150618300.4362@racer.site>
URL: https://gitlist.dev/e/Pine.LNX.4.64.0711150618300.4362%40racer.site

```
Hi,

I just realised that our test setup has a serious problem.  In my 
semi-private builtin-commit branch, there is no runstatus anymore.  Now, 
I got a new toy yesterday, and installed git on it (my fork, including 
builtin-commit), and all of a sudden tests were failing.

The failing tests were t3001 and t4001, because they call runstatus, and 
runstatus is no longer there in the builtin-commit branch.

So why did I not catch this earlier?

Because my prefix is the default prefix, which is $HOME/bin, and which is 
not turned off in the tests.  So git finds "runstatus", because it is 
still installed.

Now, things get worse if you install to /usr/bin/, which I do sometimes, 
too, because you _cannot_ remove that from the PATH.

Okay, so removing a command is not all that common, but that means that we 
have to be extra careful when we do so.

Ciao,
Dscho

```

## Junio C Hamano, 2007-11-15 07:11

Subject: Re: Problem in our test setup
Message-ID: <7vzlxg6kzt.fsf@gitster.siamese.dyndns.org>
URL: https://gitlist.dev/e/7vzlxg6kzt.fsf%40gitster.siamese.dyndns.org
In-Reply-To: <Pine.LNX.4.64.0711150618300.4362@racer.site>

```
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:

> Because my prefix is the default prefix, which is $HOME/bin, and which is 
> not turned off in the tests.  So git finds "runstatus", because it is 
> still installed.

Yes, we have a problem.

We could solve this for commands issued in "git foo" form by not
looking for "git-foo" anywhere other than in git_exec_path.  The
scripts and tests only prepend GIT_EXEC_PATH to their PATH and
run "git foo" or "git-foo", but if we replace all of them to the
non-dash form, wouldn't that solve the issue as well?

```

## Johannes Schindelin, 2007-11-15 11:40

Subject: Re: Problem in our test setup
Message-ID: <Pine.LNX.4.64.0711151237400.16728@wbgn129.biozentrum.uni-wuerzburg.de>
URL: https://gitlist.dev/e/Pine.LNX.4.64.0711151237400.16728%40wbgn129.biozentrum.uni-wuerzburg.de
In-Reply-To: <7vzlxg6kzt.fsf@gitster.siamese.dyndns.org>

```
Hi,

On Wed, 14 Nov 2007, Junio C Hamano wrote:

> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> 
> > Because my prefix is the default prefix, which is $HOME/bin, and which 
> > is not turned off in the tests.  So git finds "runstatus", because it 
> > is still installed.
> 
> Yes, we have a problem.
> 
> We could solve this for commands issued in "git foo" form by not looking 
> for "git-foo" anywhere other than in git_exec_path.  The scripts and 
> tests only prepend GIT_EXEC_PATH to their PATH and run "git foo" or 
> "git-foo", but if we replace all of them to the non-dash form, wouldn't 
> that solve the issue as well?

Funnily enough, it _is_ the non-dash form that I replaced.  What happens 
is this: the git wrapper looks for a builtin named 'runstatus', does not 
find it, then calls out for something like 'git-runstatus', which is found 
in my $HOME/bin.

Sorry,
Dscho

```

## Junio C Hamano, 2007-11-15 17:30

Subject: Re: Problem in our test setup
Message-ID: <7v3av75sct.fsf@gitster.siamese.dyndns.org>
URL: https://gitlist.dev/e/7v3av75sct.fsf%40gitster.siamese.dyndns.org
In-Reply-To: <Pine.LNX.4.64.0711151237400.16728@wbgn129.biozentrum.uni-wuerzburg.de>

```
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:

> Funnily enough, it _is_ the non-dash form that I replaced.  What happens 
> is this: the git wrapper looks for a builtin named 'runstatus', does not 
> find it, then calls out for something like 'git-runstatus', which is found 
> in my $HOME/bin.

Yes, but at that point we know we are looking for "git"
subcommand not general command on PATH, so we can only look for
"git-runstatus" in the git_exec_path (initialized by $GIT_EXEC_PATH 
or compiled-in) and correctly fail during the test.

```
