summaryrefslogtreecommitdiff
path: root/t/perf/aggregate.perl
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2021-06-18 13:56:08 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-07-02 22:47:30 (GMT)
commit3663e5904d7c0060f3b51ffe7c7469caeefb51e5 (patch)
tree89239b6b05e3615aee73de525e8e4b09cf602195 /t/perf/aggregate.perl
parent670b81a890388c60b7032a4f5b879f2ece8c4558 (diff)
downloadgit-3663e5904d7c0060f3b51ffe7c7469caeefb51e5.zip
git-3663e5904d7c0060f3b51ffe7c7469caeefb51e5.tar.gz
git-3663e5904d7c0060f3b51ffe7c7469caeefb51e5.tar.bz2
perf: fix when running with TEST_OUTPUT_DIRECTORY
When the TEST_OUTPUT_DIRECTORY is defined, then all test data will be written in that directory instead of the default directory located in "t/". While this works as expected for our normal tests, performance tests fail to locate and aggregate performance data because they don't know to handle TEST_OUTPUT_DIRECTORY correctly and always look at the default location. Fix the issue by adding a `--results-dir` parameter to "aggregate.perl" which identifies the directory where results are and by making the "run" script awake of the TEST_OUTPUT_DIRECTORY variable. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/perf/aggregate.perl')
-rwxr-xr-xt/perf/aggregate.perl5
1 files changed, 3 insertions, 2 deletions
diff --git a/t/perf/aggregate.perl b/t/perf/aggregate.perl
index 14e4cda..82c0df4 100755
--- a/t/perf/aggregate.perl
+++ b/t/perf/aggregate.perl
@@ -58,6 +58,7 @@ sub usage {
Options:
--codespeed * Format output for Codespeed
--reponame <str> * Send given reponame to codespeed
+ --results-dir <str> * Directory where test results are located
--sort-by <str> * Sort output (only "regression" criteria is supported)
--subsection <str> * Use results from given subsection
@@ -91,11 +92,13 @@ sub sane_backticks {
my (@dirs, %dirnames, %dirabbrevs, %prefixes, @tests,
$codespeed, $sortby, $subsection, $reponame);
+my $resultsdir = "test-results";
Getopt::Long::Configure qw/ require_order /;
my $rc = GetOptions("codespeed" => \$codespeed,
"reponame=s" => \$reponame,
+ "results-dir=s" => \$resultsdir,
"sort-by=s" => \$sortby,
"subsection=s" => \$subsection);
usage() unless $rc;
@@ -137,8 +140,6 @@ if (not @tests) {
@tests = glob "p????-*.sh";
}
-my $resultsdir = "test-results";
-
if (! $subsection and
exists $ENV{GIT_PERF_SUBSECTION} and
$ENV{GIT_PERF_SUBSECTION} ne "") {