summaryrefslogtreecommitdiff
path: root/t/perf/aggregate.perl
diff options
context:
space:
mode:
Diffstat (limited to 't/perf/aggregate.perl')
-rwxr-xr-xt/perf/aggregate.perl17
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;