From: Henning Schild <henning.schild@siemens.com>
To: <isar-users@googlegroups.com>
Cc: Henning Schild <henning.schild@siemens.com>
Subject: [PATCH 2/8] CI: fix shell coding style
Date: Tue, 10 Jan 2023 13:17:42 +0100 [thread overview]
Message-ID: <20230110121748.14917-3-henning.schild@siemens.com> (raw)
In-Reply-To: <20230110121748.14917-1-henning.schild@siemens.com>
Apply some suggestions from shellcheck and make sure that runs fine.
Signed-off-by: Henning Schild <henning.schild@siemens.com>
---
scripts/ci_build.sh | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/scripts/ci_build.sh b/scripts/ci_build.sh
index 84a3e472e784..e5f20d4f0a1f 100755
--- a/scripts/ci_build.sh
+++ b/scripts/ci_build.sh
@@ -20,6 +20,7 @@ if ! command -v avocado > /dev/null; then
sudo apt-get install -y virtualenv
rm -rf /tmp/avocado_venv
virtualenv --python python3 /tmp/avocado_venv
+ # shellcheck source=/dev/null
source /tmp/avocado_venv/bin/activate
pip install avocado-framework==99.0
fi
@@ -33,8 +34,8 @@ BASE_DIR=./build
# Check dependencies
DEPENDENCIES="umoci skopeo"
for prog in ${DEPENDENCIES} ; do
- if [ ! -x "$(which $prog)" ] ; then
- echo "missing $prog in PATH" >&2
+ if ! command -v "${prog}" > /dev/null; then
+ echo "missing ${prog} in PATH" >&2
fi
done
@@ -132,16 +133,16 @@ fi
mkdir -p .config/avocado
cat <<EOF > .config/avocado/avocado.conf
[datadir.paths]
-base_dir = $(realpath $BASE_DIR)/
-test_dir = $(realpath $BASE_DIR)/tests
-data_dir = $(realpath $BASE_DIR)/data
-logs_dir = $(realpath $BASE_DIR)/job-results
+base_dir = $(realpath "${BASE_DIR}")/
+test_dir = $(realpath "${BASE_DIR}")/tests
+data_dir = $(realpath "${BASE_DIR}")/data
+logs_dir = $(realpath "${BASE_DIR}")/job-results
EOF
export VIRTUAL_ENV="./"
# the real stuff starts here, trace commands from now on
set -x
-avocado $VERBOSE run "$TESTSUITE_DIR/citest.py" \
- -t $TAGS --nrunner-max-parallel-tasks=1 --disable-sysinfo \
- -p quiet=$QUIET -p cross=$CROSS_BUILD -p time_to_wait=$TIMEOUT
+avocado ${VERBOSE} run "${TESTSUITE_DIR}/citest.py" \
+ -t "${TAGS}" --nrunner-max-parallel-tasks=1 --disable-sysinfo \
+ -p quiet="${QUIET}" -p cross="${CROSS_BUILD}" -p time_to_wait="${TIMEOUT}"
--
2.38.2
next prev parent reply other threads:[~2023-01-10 12:18 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-10 12:17 [PATCH 0/8] CI rework of gitlab fast job Henning Schild
2023-01-10 12:17 ` [PATCH 1/8] CI: move to avocado to 99.0 Henning Schild
2023-01-10 12:17 ` Henning Schild [this message]
2023-01-10 12:17 ` [PATCH 3/8] CI: install qemu-system when qemu testing is requested Henning Schild
2023-01-10 12:17 ` [PATCH 4/8] testsuite: remove Ccache test from "fast" set Henning Schild
2023-01-10 12:38 ` Jan Kiszka
2023-01-10 12:17 ` [PATCH 5/8] testsuite: remove Sdk " Henning Schild
2023-01-10 12:38 ` Jan Kiszka
2023-01-10 15:44 ` Henning Schild
2023-01-10 12:17 ` [PATCH 6/8] testsuite: remove ContainerImage " Henning Schild
2023-01-10 12:17 ` [PATCH 7/8] testsuite: remove ContainerSdk " Henning Schild
2023-01-10 12:17 ` [PATCH 8/8] testsuite: remove Sstate " Henning Schild
2023-01-10 12:24 ` [PATCH 0/8] CI rework of gitlab fast job Henning Schild
2023-01-12 12:23 ` Baurzhan Ismagulov
2023-01-12 15:12 ` Henning Schild
2023-01-12 15:20 ` Baurzhan Ismagulov
2023-01-12 23:43 ` Henning Schild
2023-01-13 4:34 ` Moessbauer, Felix
2023-01-13 13:14 ` Baurzhan Ismagulov
2023-01-13 17:14 ` Henning Schild
2023-01-14 14:40 ` Baurzhan Ismagulov
2023-01-23 8:26 ` Henning Schild
2023-04-02 19:13 ` Baurzhan Ismagulov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230110121748.14917-3-henning.schild@siemens.com \
--to=henning.schild@siemens.com \
--cc=isar-users@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox