diff options
| author | Veronika Molnarova <vmolnaro@redhat.com> | 2024-07-02 13:08:42 +0200 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2024-08-28 18:07:20 -0300 |
| commit | 32ddd082dcac111908c5f11e0617cd0f8ec10350 (patch) | |
| tree | 5f07ada08f53f55def1d57e5d110b26631e6eecc /tools/perf/tests/shell/common/settings.sh | |
| parent | a3a02a52bcfcbcc4a637d4b68bf1bc391c9fad02 (diff) | |
| download | linux-next-32ddd082dcac111908c5f11e0617cd0f8ec10350.tar.gz linux-next-32ddd082dcac111908c5f11e0617cd0f8ec10350.zip | |
perf testsuite: Fix shellcheck warnings
Shellcheck is becoming a standard when building perf to prevent
any unnecessary mistakes. Fix shellcheck warnings in perf testsuite.
Signed-off-by: Veronika Molnarova <vmolnaro@redhat.com>
Cc: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lore.kernel.org/r/20240702110849.31904-5-vmolnaro@redhat.com
Signed-off-by: Michael Petlan <mpetlan@redhat.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/tests/shell/common/settings.sh')
| -rw-r--r-- | tools/perf/tests/shell/common/settings.sh | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tools/perf/tests/shell/common/settings.sh b/tools/perf/tests/shell/common/settings.sh index dcdb7d49ac00..2e50dd0bff9b 100644 --- a/tools/perf/tests/shell/common/settings.sh +++ b/tools/perf/tests/shell/common/settings.sh @@ -45,7 +45,7 @@ export TEST_IGNORE_MISSING_PMU=${TEST_IGNORE_MISSING_PMU:-n} export LC_ALL=C #### colors -if [ -t 1 -o "$TESTLOG_FORCE_COLOR" = "yes" ]; then +if [ -t 1 ] || [ "$TESTLOG_FORCE_COLOR" = "yes" ]; then export MPASS="\e[32m" export MALLPASS="\e[1;32m" export MFAIL="\e[31m" @@ -68,15 +68,15 @@ fi ### general info DIR_PATH=`dirname "$(readlink -e "$0")"` -export TEST_NAME=`basename $DIR_PATH | sed 's/base/perf/'` -export MY_ARCH=`arch` +TEST_NAME=`basename $DIR_PATH | sed 's/base/perf/'`; export TEST_NAME +MY_ARCH=`arch`; export MY_ARCH # storing logs and temporary files variables if [ -n "$PERFSUITE_RUN_DIR" ]; then # when $PERFSUITE_RUN_DIR is set to something, all the logs and temp files will be placed there # --> the $PERFSUITE_RUN_DIR/perf_something/examples and $PERFSUITE_RUN_DIR/perf_something/logs # dirs will be used for that - export PERFSUITE_RUN_DIR=`readlink -f $PERFSUITE_RUN_DIR` + PERFSUITE_RUN_DIR=`readlink -f $PERFSUITE_RUN_DIR`; export PERFSUITE_RUN_DIR export CURRENT_TEST_DIR="$PERFSUITE_RUN_DIR/$TEST_NAME" export MAKE_TARGET_DIR="$CURRENT_TEST_DIR/examples" export LOGS_DIR="$CURRENT_TEST_DIR/logs" @@ -93,6 +93,7 @@ fi if [ ! -d ./common ]; then # set parameters based on runmode if [ -f ../common/parametrization.$PERFTOOL_TESTSUITE_RUNMODE.sh ]; then + # shellcheck source=/dev/null . ../common/parametrization.$PERFTOOL_TESTSUITE_RUNMODE.sh fi # if some parameters haven't been set until now, set them to default |
