summaryrefslogtreecommitdiff
path: root/tcwg-buildfarm.sh
diff options
context:
space:
mode:
authorDavid Spickett <david.spickett@linaro.org>2020-04-22 15:24:49 +0100
committerDavid Spickett <david.spickett@linaro.org>2020-04-23 12:54:33 +0100
commit52eb5a521c093601e3fba856599288bad7a5d96f (patch)
tree0e8a0c567c9d727becf411078f44cfc619c5f954 /tcwg-buildfarm.sh
parent2382c087b5f0d51a4556c8c62f4723ab5a0ab7c9 (diff)
Shellcheck fixes round 2
Also update the sanity check script to include .job files. Change-Id: Ibf72d9ff346ff7b012d4e282a6ac8f3b7e73590d
Diffstat (limited to 'tcwg-buildfarm.sh')
-rwxr-xr-xtcwg-buildfarm.sh17
1 files changed, 11 insertions, 6 deletions
diff --git a/tcwg-buildfarm.sh b/tcwg-buildfarm.sh
index 0df56747..bf0fb589 100755
--- a/tcwg-buildfarm.sh
+++ b/tcwg-buildfarm.sh
@@ -43,6 +43,7 @@ set -u
# in convert_args_to_variables, but label is also defined by
# convert_args_to_variables, so we have to patch host in log_name via
# a sed trick later.
+# shellcheck disable=SC2034
host=$(print_type_for_label $label)
if [ x"$target" = x"$label" ]; then
@@ -69,6 +70,8 @@ if echo $runtests | grep -q $target; then
bash -x ./jenkins-scripts/start-container-qemu.sh --weight 2 --label $tester_label --distro ${test_container_tag} --session-name "$session_name" --task test --prefix test_ --kernel_url https://dev-01.tcwglab/~tcwg-buildslave/images/ilp32/norov-Image --initrd_url https://cloud-images.ubuntu.com/releases/16.04/release/unpacked/ubuntu-16.04-server-cloudimg-arm64-initrd-generic > test-container.sh
fi
. ./test-container.sh
+ # Vars come from test-container.sh
+ # shellcheck disable=SC2154
runtests_opt="$runtests_opt --testcontainer ${test_container_host}:${test_container_port}"
fi
# Define qemu_cpu even if testing will not use it (it's
@@ -104,6 +107,7 @@ if [ x"$log_name" != x"" ]; then
# As explained above, host is defined too late and cannot be
# expanded when we define log_name, so use a sed trick.
log_name=$(echo $log_name | sed 's/@@host@@/$host/g')
+ declare logname_opt
eval "logname_opt=\"--logname $log_name\""
fi
@@ -180,18 +184,19 @@ if [ x"${manifest}" != x ]; then
cp ${manifest} artifacts/
else
# We need to do the same name expansion as jenkins.sh
+ declare dir
eval dir="$log_name"
scp "$log_server/$dir/*manifest.txt" artifacts/
fi
# Provide requested binaries as artifacts
if $binaries; then
- cp $(grep "^toolchain=" ${WORKSPACE}/build-artifacts.txt | cut -d = -f 2-) artifacts/
- cp $(grep "^toolchain_asc=" ${WORKSPACE}/build-artifacts.txt | cut -d = -f 2-) artifacts/
- cp $(grep "^runtime=" ${WORKSPACE}/build-artifacts.txt | cut -d = -f 2-) artifacts/
- cp $(grep "^runtime_asc=" ${WORKSPACE}/build-artifacts.txt | cut -d = -f 2-) artifacts/
- cp $(grep "^sysroot=" ${WORKSPACE}/build-artifacts.txt | cut -d = -f 2-) artifacts/
- cp $(grep "^sysroot_asc=" ${WORKSPACE}/build-artifacts.txt | cut -d = -f 2-) artifacts/
+ cp "$(grep "^toolchain=" ${WORKSPACE}/build-artifacts.txt | cut -d = -f 2-)" artifacts/
+ cp "$(grep "^toolchain_asc=" ${WORKSPACE}/build-artifacts.txt | cut -d = -f 2-)" artifacts/
+ cp "$(grep "^runtime=" ${WORKSPACE}/build-artifacts.txt | cut -d = -f 2-)" artifacts/
+ cp "$(grep "^runtime_asc=" ${WORKSPACE}/build-artifacts.txt | cut -d = -f 2-)" artifacts/
+ cp "$(grep "^sysroot=" ${WORKSPACE}/build-artifacts.txt | cut -d = -f 2-)" artifacts/
+ cp "$(grep "^sysroot_asc=" ${WORKSPACE}/build-artifacts.txt | cut -d = -f 2-)" artifacts/
fi
# Save logs and their directory structure