threads / discuss / 10875

Problem in our test setup

Subject: Problem in our test setup

## tl;dr

4 messages between Nov 15, 2007 and Nov 15, 2007.

replies: 3people: 2as markdown or json

Johannes Schindelin· Nov 15, 2007, 06:24 UTC · lore
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· Nov 15, 2007, 07:11 UTC · re: Johannes Schindelin · lore

Re: Problem in our test setup

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· Nov 15, 2007, 11:40 UTC · re: Junio C Hamano · lore

Re: Problem in our test setup

Hi,
On Wed, 14 Nov 2007, Junio C Hamano wrote:
Show 13 quoted lines
> 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· Nov 15, 2007, 17:30 UTC · re: Johannes Schindelin · lore

Re: Problem in our test setup

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.

← back to recent threads