format shell scripts with beautysh
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Ie72911e0f57a1f69b0bf317de8c52947886e1303
diff --git a/scripts/boot-qemu.sh b/scripts/boot-qemu.sh
index fd52c9e..bea10dd 100755
--- a/scripts/boot-qemu.sh
+++ b/scripts/boot-qemu.sh
@@ -88,7 +88,7 @@
# Obtain IP from /etc/hosts if IP is not valid set to localhost
IP=$(awk 'END{print $1}' /etc/hosts)
if [[ "$IP" != *.*.*.* ]]; then
- IP=127.0.0.1
+ IP=127.0.0.1
fi
# Forward all needed ports for the robot test framework to run
diff --git a/scripts/build-qemu-robot-docker.sh b/scripts/build-qemu-robot-docker.sh
index ee4b61d..f985b5c 100755
--- a/scripts/build-qemu-robot-docker.sh
+++ b/scripts/build-qemu-robot-docker.sh
@@ -157,7 +157,7 @@
PROXY_ARGS=""
if [[ -n "${http_proxy}" ]]; then
- PROXY_ARGS="--build-arg http_proxy=${http_proxy} --build-arg https_proxy=${http_proxy}"
+ PROXY_ARGS="--build-arg http_proxy=${http_proxy} --build-arg https_proxy=${http_proxy}"
fi
# Build above image
diff --git a/scripts/clean-unit-test-docker b/scripts/clean-unit-test-docker
index 696dee6..6c8cd5a 100755
--- a/scripts/clean-unit-test-docker
+++ b/scripts/clean-unit-test-docker
@@ -9,6 +9,6 @@
# * ww is the two digit ISO week. (date format %V)
docker image ls \
- "openbmc/ubuntu-unit-test*" \
- --format "{{.Repository}}:{{.Tag}}" |
- grep -v "$(date '+%Y-W%V')" | xargs -r docker image rm || true
+ "openbmc/ubuntu-unit-test*" \
+ --format "{{.Repository}}:{{.Tag}}" |
+grep -v "$(date '+%Y-W%V')" | xargs -r docker image rm || true
diff --git a/scripts/format-code.sh b/scripts/format-code.sh
index c7bf16c..2dd5497 100755
--- a/scripts/format-code.sh
+++ b/scripts/format-code.sh
@@ -176,7 +176,7 @@
LINTER_REQUIRE+=([clang_format]="clang-format;.clang-format")
LINTER_IGNORE+=([clang_format]=".clang-ignore;.clang-format-ignore")
LINTER_TYPES+=([clang_format]="c;cpp")
-do_clang_format() {
+function do_clang_format() {
"${CLANG_FORMAT}" -i "$@"
}
diff --git a/scripts/run-robot.sh b/scripts/run-robot.sh
index fab7941..357608e 100755
--- a/scripts/run-robot.sh
+++ b/scripts/run-robot.sh
@@ -20,15 +20,15 @@
MACHINE=${MACHINE:-"qemu"}
ROBOT_CODE_HOME=${ROBOT_CODE_HOME:-/tmp/$(whoami)/${RANDOM}/obmc-robot/}
-ROBOT_TEST_CMD=${ROBOT_TEST_CMD:-"python3 -m robot\
+ROBOT_TEST_CMD="${ROBOT_TEST_CMD:-"python3 -m robot\
-v OPENBMC_HOST:${IP_ADDR}\
-v SSH_PORT:${SSH_PORT}\
-v HTTPS_PORT:${HTTPS_PORT}\
-v REDFISH_SUPPORT_TRANS_STATE:1\
- --argumentfile ./test_lists/QEMU_CI ./tests ./redfish ./ipmi"}
+ --argumentfile ./test_lists/QEMU_CI ./tests ./redfish ./ipmi"}"
git clone https://github.com/openbmc/openbmc-test-automation.git \
- "${ROBOT_CODE_HOME}"
+ "${ROBOT_CODE_HOME}"
cd "${ROBOT_CODE_HOME}" || exit
diff --git a/scripts/test-qemu b/scripts/test-qemu
index 7cdb180..813fd73 100755
--- a/scripts/test-qemu
+++ b/scripts/test-qemu
@@ -7,7 +7,7 @@
trap 'rm -rf ${ARTIFACT_DIR}' EXIT
-acquire() {
+function acquire() {
local target="$1"
wget --quiet --show-progress --directory-prefix="${ARTIFACT_DIR}" https://jenkins.openbmc.org/view/latest/job/latest-master/lastSuccessfulBuild/label=docker-builder,target="${target}"/artifact/openbmc/build/tmp/deploy/images/"${target}"/'*zip*'/"${target}".zip
unzip -qq -d "${ARTIFACT_DIR}" "${ARTIFACT_DIR}"/"${target}".zip
@@ -24,7 +24,7 @@
-drive file=${PALMETTO_MTD},if=mtd,format=raw \
-nographic \
-net nic \
- -net user,hostfwd=:127.0.0.1:2222-:22,hostfwd=:127.0.0.1:2443-:443,hostname=qemu" \
+ -net user,hostfwd=:127.0.0.1:2222-:22,hostfwd=:127.0.0.1:2443-:443,hostname=qemu" \
-c 'set timeout 300' \
-c 'expect timeout { exit 1 } "login:"' \
-c 'spawn sshpass -p 0penBmc ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p2222 root@localhost journalctl -b' \
@@ -40,7 +40,7 @@
-drive file=${WITHERSPOON_MTD},if=mtd,format=raw \
-nographic \
-net nic \
- -net user,hostfwd=:127.0.0.1:2222-:22,hostfwd=:127.0.0.1:2443-:443,hostname=qemu" \
+ -net user,hostfwd=:127.0.0.1:2222-:22,hostfwd=:127.0.0.1:2443-:443,hostname=qemu" \
-c 'set timeout 300' \
-c 'expect timeout { exit 1 } "login:"' \
-c 'spawn sshpass -p 0penBmc ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p2222 root@localhost journalctl -b' \
@@ -68,7 +68,7 @@
-drive file=${P10BMC_MMC},if=sd,format=raw,index=2 \
-net nic \
-net user,hostfwd=:127.0.0.1:2222-:22,hostfwd=:127.0.0.1:2443-:443,hostname=qemu \
- -nographic" \
+ -nographic" \
-c 'set timeout 300' \
-c 'expect timeout { exit 1 } "login:"' \
-c 'spawn sshpass -p 0penBmc ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p2222 root@localhost journalctl -b' \