diff options
author | Jiang Xin <worldhello.net@gmail.com> | 2019-05-31 14:34:26 +0800 |
---|---|---|
committer | Jiang Xin <worldhello.net@gmail.com> | 2019-05-31 14:34:26 +0800 |
commit | a17177ce3ac74afc0b2e6fc6c80c1e1991b96a13 (patch) | |
tree | 0ff1a62d28a13bc8d8708148b85d3b0ba2632f92 /t/perf/aggregate.perl | |
parent | Merge branch 'master' of https://github.com/Softcatala/git-po (diff) | |
parent | Git 2.22-rc2 (diff) | |
download | tgif-a17177ce3ac74afc0b2e6fc6c80c1e1991b96a13.tar.xz |
Merge branch 'master' of git://git.kernel.org/pub/scm/git/git
* 'master' of git://git.kernel.org/pub/scm/git/git: (66 commits)
Git 2.22-rc2
...
Diffstat (limited to 't/perf/aggregate.perl')
-rwxr-xr-x | t/perf/aggregate.perl | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/t/perf/aggregate.perl b/t/perf/aggregate.perl index 76dd48f890..66554d2161 100755 --- a/t/perf/aggregate.perl +++ b/t/perf/aggregate.perl @@ -5,6 +5,7 @@ use strict; use warnings; use Getopt::Long; use Git; +use Cwd qw(realpath); sub get_times { my $name = shift; @@ -98,18 +99,21 @@ usage() unless $rc; while (scalar @ARGV) { my $arg = $ARGV[0]; my $dir; + my $prefix = ''; last if -f $arg or $arg eq "--"; if (! -d $arg) { my $rev = Git::command_oneline(qw(rev-parse --verify), $arg); $dir = "build/".$rev; + } elsif ($arg eq '.') { + $dir = '.'; } else { - $arg =~ s{/*$}{}; - $dir = $arg; - $dirabbrevs{$dir} = $dir; + $dir = realpath($arg); + $dirnames{$dir} = $dir; + $prefix .= 'bindir'; } push @dirs, $dir; - $dirnames{$dir} = $arg; - my $prefix = $dir; + $dirnames{$dir} ||= $arg; + $prefix .= $dir; $prefix =~ tr/^a-zA-Z0-9/_/c; $prefixes{$dir} = $prefix . '.'; shift @ARGV; @@ -311,9 +315,6 @@ sub print_codespeed_results { $environment = $reponame; } elsif (exists $ENV{GIT_PERF_REPO_NAME} and $ENV{GIT_PERF_REPO_NAME} ne "") { $environment = $ENV{GIT_PERF_REPO_NAME}; - } elsif (exists $ENV{GIT_TEST_INSTALLED} and $ENV{GIT_TEST_INSTALLED} ne "") { - $environment = $ENV{GIT_TEST_INSTALLED}; - $environment =~ s|/bin-wrappers$||; } else { $environment = `uname -r`; chomp $environment; |