@matheusbsbs / matheus-bagliano / commits / d3140f5c2a
Fork 0

Perly Git: make sure we do test the freshly built one.

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>

Junio C Hamano committed Jul 2, 2006 at 16:49 UTC d3140f5c2a6b42361bca960f627b00264d5c7372
3 files changed +12 -3
git-fmt-merge-msg.perl
+5 -1
@@ -5,7 +5,11 @@
5 # Read .git/FETCH_HEAD and make a human readable merge message
6 # by grouping branches and tags together to form a single line.
7
8 -BEGIN { unshift @INC, '@@INSTLIBDIR@@'; }
8 +BEGIN {
9 + unless (exists $ENV{'RUNNING_GIT_TESTS'}) {
10 + unshift @INC, '@@INSTLIBDIR@@';
11 + }
12 +}
13 use strict;
14 use Git;
15 use Error qw(:try);
git-mv.perl
+5 -1
@@ -6,7 +6,11 @@
6 # This file is licensed under the GPL v2, or a later version
7 # at the discretion of Linus Torvalds.
8
9 -BEGIN { unshift @INC, '@@INSTLIBDIR@@'; }
9 +BEGIN {
10 + unless (exists $ENV{'RUNNING_GIT_TESTS'}) {
11 + unshift @INC, '@@INSTLIBDIR@@';
12 + }
13 +}
14 use warnings;
15 use strict;
16 use Getopt::Std;
t/test-lib.sh
+2 -1
@@ -206,8 +206,9 @@ PYTHON=`sed -e '1{
206 PYTHONPATH=$(pwd)/../compat
207 export PYTHONPATH
208 }
209 +RUNNING_GIT_TESTS=YesWeAre
210 PERL5LIB=$(pwd)/../perl/blib/lib:$(pwd)/../perl/blib/arch/auto/Git
210 -export PERL5LIB
211 +export PERL5LIB RUNNING_GIT_TESTS
212 test -d ../templates/blt || {
213 error "You haven't built things yet, have you?"
214 }