Skip to content

Commit

Permalink
Perly Git: make sure we do test the freshly built one.
Browse files Browse the repository at this point in the history
We could BEGIN { push @INC, '@@INSTLIBDIR@@'; } but that is not
a good idea for normal execution.  The would prevent a
workaround for a user who is trying to override an old, faulty
Git.pm installed on the system path with a newer version
installed under $HOME/.

Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Junio C Hamano committed Jul 3, 2006
1 parent 65a4e98 commit d3140f5
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
6 changes: 5 additions & 1 deletion git-fmt-merge-msg.perl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@
# Read .git/FETCH_HEAD and make a human readable merge message
# by grouping branches and tags together to form a single line.

BEGIN { unshift @INC, '@@INSTLIBDIR@@'; }
BEGIN {
unless (exists $ENV{'RUNNING_GIT_TESTS'}) {
unshift @INC, '@@INSTLIBDIR@@';
}
}
use strict;
use Git;
use Error qw(:try);
Expand Down
6 changes: 5 additions & 1 deletion git-mv.perl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@
# This file is licensed under the GPL v2, or a later version
# at the discretion of Linus Torvalds.

BEGIN { unshift @INC, '@@INSTLIBDIR@@'; }
BEGIN {
unless (exists $ENV{'RUNNING_GIT_TESTS'}) {
unshift @INC, '@@INSTLIBDIR@@';
}
}
use warnings;
use strict;
use Getopt::Std;
Expand Down
3 changes: 2 additions & 1 deletion t/test-lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,9 @@ PYTHON=`sed -e '1{
PYTHONPATH=$(pwd)/../compat
export PYTHONPATH
}
RUNNING_GIT_TESTS=YesWeAre
PERL5LIB=$(pwd)/../perl/blib/lib:$(pwd)/../perl/blib/arch/auto/Git
export PERL5LIB
export PERL5LIB RUNNING_GIT_TESTS
test -d ../templates/blt || {
error "You haven't built things yet, have you?"
}
Expand Down

0 comments on commit d3140f5

Please sign in to comment.