t/perf: make runner work even if Git is not installed
authorStephan Beyer <s-beyer@gmx.net>
Fri, 25 Sep 2015 00:31:37 +0000 (02:31 +0200)
committerJunio C Hamano <gitster@pobox.com>
Fri, 25 Sep 2015 17:44:59 +0000 (10:44 -0700)
aggregate.perl did not work when Git.pm is not installed to a directory
contained in the default Perl library path list or PERLLIB.
This commit prepends the Perl library path of the current Git source
tree to enable this.

Note that this commit adds a hard-coded relative path

use lib '../../perl/blib/lib';

instead of the flexible environment-based variant

use lib (split(/:/, $ENV{GITPERLLIB}));

which is used in tests written in Perl.
The hard-coded variant is used because the whole performance test
framework does it that way (and GITPERLLIB is not set there).

Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/perf/aggregate.perl
index 15f7fc1b8015114883bc36d1e35dffd730721e52..924b19dab4122a36112bd908a6252e754ecc531a 100755 (executable)
@@ -1,5 +1,6 @@
 #!/usr/bin/perl
 
+use lib '../../perl/blib/lib';
 use strict;
 use warnings;
 use Git;