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>
This commit is contained in:

committed by
Junio C Hamano

parent
670b81a890
commit
3663e5904d
@ -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 "") {
|
||||
|
Reference in New Issue
Block a user