scripts: fix shell scripts according to shellcheck errors

Unify coding style of shell scripts in accordance with
shellcheck errors.

Signed-off-by: Ruslan Mstoi <ruslan.mstoi@intel.com>
This commit is contained in:
Ruslan Mstoi
2024-01-29 17:38:44 +02:00
committed by Rob Bradford
parent 318caeb9d8
commit 2b2d00653c
16 changed files with 288 additions and 251 deletions

View File

@@ -1,12 +1,15 @@
#!/usr/bin/env bash
# shellcheck disable=SC2068
source $HOME/.cargo/env
source $(dirname "$0")/test-util.sh
# shellcheck source=/dev/null
source "$HOME"/.cargo/env
source "$(dirname "$0")"/test-util.sh
process_common_args "$@"
cargo_args=("")
# shellcheck disable=SC2154
if [[ $hypervisor = "mshv" ]]; then
cargo_args+=("--features $hypervisor")
elif [[ $(uname -m) = "x86_64" ]]; then
@@ -14,5 +17,5 @@ elif [[ $(uname -m) = "x86_64" ]]; then
fi
export RUST_BACKTRACE=1
cargo test --lib --bins --target $BUILD_TARGET --workspace ${cargo_args[@]} || exit 1
cargo test --doc --target $BUILD_TARGET --workspace ${cargo_args[@]} || exit 1
cargo test --lib --bins --target "$BUILD_TARGET" --workspace ${cargo_args[@]} || exit 1
cargo test --doc --target "$BUILD_TARGET" --workspace ${cargo_args[@]} || exit 1