diff options
author | Junio C Hamano <gitster@pobox.com> | 2019-05-19 07:45:28 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-05-19 07:45:28 (GMT) |
commit | 82dca958dd8c3eba22653c605710c3ef6514958f (patch) | |
tree | 1f9e4f00cb8d348c0566ee5ab2e57ee196c5bdc5 /t/perf/aggregate.perl | |
parent | f42bee7d51af9c339dfad8e854149810c34fb7d3 (diff) | |
parent | 82b7eb231d146678317fd4cf63a646c4233976e0 (diff) | |
download | git-82dca958dd8c3eba22653c605710c3ef6514958f.zip git-82dca958dd8c3eba22653c605710c3ef6514958f.tar.gz git-82dca958dd8c3eba22653c605710c3ef6514958f.tar.bz2 |
Merge branch 'ab/perf-installed-fix'
Performance test framework has been broken and measured the version
of Git that happens to be on $PATH, not the specified one to
measure, for a while, which has been corrected.
* ab/perf-installed-fix:
perf-lib.sh: forbid the use of GIT_TEST_INSTALLED
perf tests: add "bindir" prefix to git tree test results
perf-lib.sh: remove GIT_TEST_INSTALLED from perf-lib.sh
perf-lib.sh: make "./run <revisions>" use the correct gits
perf aggregate: remove GIT_TEST_INSTALLED from --codespeed
perf README: correct docs for 3c8f12c96c regression
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 76dd48f..66554d2 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; |