diff options
author | Junio C Hamano <gitster@pobox.com> | 2019-12-11 00:11:44 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-12-11 00:11:44 +0300 |
commit | 55c37d12d3b105856cb8085c5d7e26bed313e863 (patch) | |
tree | 315b642382f66843867937cc33e91bc73d9e85c0 /t/perf | |
parent | 41dac79c2f49f9ea1c808f0f208bde9aa4ed91cb (diff) | |
parent | 528d9e6d0190b0ab8fbbab0b7b1b68f512f5dfcd (diff) |
Merge branch 'jk/perf-wo-git-dot-pm'
Test cleanup.
* jk/perf-wo-git-dot-pm:
t/perf: don't depend on Git.pm
Diffstat (limited to 't/perf')
-rwxr-xr-x | t/perf/aggregate.perl | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/t/perf/aggregate.perl b/t/perf/aggregate.perl index 112fc23dbe..14e4cda287 100755 --- a/t/perf/aggregate.perl +++ b/t/perf/aggregate.perl @@ -4,7 +4,6 @@ use lib '../../perl/build/lib'; use strict; use warnings; use Getopt::Long; -use Git; use Cwd qw(realpath); sub get_times { @@ -85,6 +84,11 @@ sub format_size { return $out; } +sub sane_backticks { + open(my $fh, '-|', @_); + return <$fh>; +} + my (@dirs, %dirnames, %dirabbrevs, %prefixes, @tests, $codespeed, $sortby, $subsection, $reponame); @@ -102,7 +106,8 @@ while (scalar @ARGV) { my $prefix = ''; last if -f $arg or $arg eq "--"; if (! -d $arg) { - my $rev = Git::command_oneline(qw(rev-parse --verify), $arg); + my $rev = sane_backticks(qw(git rev-parse --verify), $arg); + chomp $rev; $dir = "build/".$rev; } elsif ($arg eq '.') { $dir = '.'; |