Re: [PATCH 1/8] perf: fix when running with TEST_OUTPUT_DIRECTORY
On Wed, May 19, 2021 at 1:21 PM Patrick Steinhardt <ps@pks.im> wrote:
Show 10 quoted lines
> 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.
Trivial typo: s/awake/aware/
(The perl code looks OK to me but I'm no Perl programmer)
Show 6 quoted lines
>+if test -n "$TEST_OUTPUT_DIRECTORY"
>+then
>+ TEST_RESULTS_DIR="$TEST_OUTPUT_DIRECTORY/test-results"
>+else
>+ TEST_RESULTS_DIR=test-results
>+fi
Optional shorter (one-liner) replacement:
TEST_RESULTS_DIR=${TEST_OUTPUT_DIRECTORY:+$TEST_OUTPUT_DIRECTORY/}test-resultsChris