Re: [PATCH 1/8] perf: fix when running with TEST_OUTPUT_DIRECTORY

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, May 19, 2021 at 1:21 PM Patrick Steinhardt <ps@xxxxxx> wrote:
> 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)

>+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-results

Chris



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux