summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xMakeRelease.job13
-rwxr-xr-xabe-bisect-helper.sh2
-rwxr-xr-xabe-bisect.sh10
-rwxr-xr-xdocker-run.sh1
-rw-r--r--jenkins-helpers.sh13
-rwxr-xr-xjenkins.sh9
-rwxr-xr-xround-robin-bisect.sh5
-rw-r--r--round-robin.sh8
-rwxr-xr-xsanity-check.sh43
-rwxr-xr-xstart-container-qemu.sh1
-rwxr-xr-xtcwg-benchmark-results.sh1
-rwxr-xr-xtcwg-buildfarm.sh4
-rwxr-xr-xtcwg-cleanup-stale-containers.sh4
-rwxr-xr-xtcwg-dev-build.sh1
-rwxr-xr-xtcwg-generate-source-cache.sh1
-rwxr-xr-xtcwg-llvm-build.sh1
-rwxr-xr-xtcwg-llvm-release.sh1
-rwxr-xr-xtcwg-llvm-testsuite.sh2
-rwxr-xr-xtcwg-start-container.sh1
-rwxr-xr-xtcwg-update-host-containers.sh1
-rwxr-xr-xtcwg-update-llvmbot-containers.sh1
-rwxr-xr-xtcwg-update-tested.sh1
-rwxr-xr-xtcwg-upstream2gerrit.sh3
-rwxr-xr-xtcwg_bmk-build.sh8
-rwxr-xr-xtcwg_gnu-build.sh2
-rwxr-xr-xtcwg_kernel-build.sh6
26 files changed, 88 insertions, 55 deletions
diff --git a/MakeRelease.job b/MakeRelease.job
index cd2a6bfc..017189a8 100755
--- a/MakeRelease.job
+++ b/MakeRelease.job
@@ -132,7 +132,7 @@ if [ x"$target" = x"aarch64-linux-gnu_ilp32" ]; then
fi
# Use the newly created build directory
-cd ${user_workspace}/_build
+cd ${user_workspace}/_build || exit
if ! test -e host.conf; then
$CONFIG_SHELL ${abe_dir}/configure --with-local-snapshots=${user_snapshots} \
@@ -156,7 +156,8 @@ logfile=${user_workspace}/MakeRelease-${buildnumber}-$(uname -m).log
# Set ABE's --target setting. No setting means native.
# If manifest file is set, then ABE must use its setting.
target_opt=
-if [ x"${target}" != x"native" -a x"${target}" != x -a x"$manifest" = x"" ]; then
+if [ x"${target}" != x"native" ] && [ x"${target}" != x ] && \
+ [ x"$manifest" = x"" ]; then
target_opt="--target ${target}"
fi
@@ -236,16 +237,16 @@ buildid=`printf '%04d' ${buildnumber}`
binaries="$artifacts_top/binaries/${gcc_release}-${series_date}-${buildid}/${target}"
logs="$artifacts_top/logs/${gcc_release}-${series_date}-${buildid}/${target}"
-if [ "x${binariesdir}" != "x" -a \
- "x${binariesdir}" != "x${binaries}" ]; then
+if [ "x${binariesdir}" != "x"] && \
+ [ "x${binariesdir}" != "x${binaries}" ]; then
echo "WARNING: Provided binaries dirname does not match with what was computed"
echo "Provided: ${binariesdir}"
echo "Computed: ${binaries}"
binaries=${binariesdir}
fi
-if [ "x${logsdir}" != "x" -a \
- "x${logsdir}" != "x${logs}" ]; then
+if [ "x${logsdir}" != "x"] && \
+ [ "x${logsdir}" != "x${logs}" ]; then
echo "WARNING: Provided logs dirname does not match with what was computed"
echo "Provided: ${logsdir}"
echo "Computed: ${logs}"
diff --git a/abe-bisect-helper.sh b/abe-bisect-helper.sh
index ac546f1b..50605a66 100755
--- a/abe-bisect-helper.sh
+++ b/abe-bisect-helper.sh
@@ -33,7 +33,7 @@ echo AT "$(date)" BISECT TRYING: ${REV}
git --no-pager show $REV
set -x
-cd ${RUNDIR}
+cd ${RUNDIR} || exit
# Build list of gcc configure options depending on cpu/fpu/mode
GCC_OVERRIDE_CONFIGURE=
diff --git a/abe-bisect.sh b/abe-bisect.sh
index a933c7d9..69607914 100755
--- a/abe-bisect.sh
+++ b/abe-bisect.sh
@@ -39,9 +39,9 @@ check_set TARGET
rundir=`pwd -P`
mydir="$(dirname $0)"
-cd "${mydir}"
+cd "${mydir}" || exit
mydir="$(pwd)"
-cd ${rundir}
+cd ${rundir} || exit
MAILBODY=${rundir}/mail-body.txt
rm -f $MAILBODY
@@ -57,7 +57,7 @@ ${ABE}/abe.sh --target $TARGET --retrieve all
rm -rf gcc-bisect-dir
git-new-workdir ./snapshots/gcc.git gcc-bisect-dir
-cd gcc-bisect-dir
+cd gcc-bisect-dir || exit
git bisect reset
git reset --hard
@@ -91,7 +91,7 @@ if [ x"${MODE}" != x ]; then
fi
# Sanity checks on the number of passes/fails in GOOD and BAD
-pushd ${rundir}
+pushd ${rundir} || exit
${ABE}/abe.sh --target ${TARGET} \
gcc=gcc.git@${GOODSHA1} \
--set runtestflags="${EXP}=${TESTNAME}" \
@@ -130,7 +130,7 @@ if [ $bad_nb_fail -le $good_nb_fail ]; then
exit 1
fi
-popd
+popd || exit
git bisect good ${GOODSHA1}
git bisect bad ${BADSHA1}
diff --git a/docker-run.sh b/docker-run.sh
index ca347447..c626de11 100755
--- a/docker-run.sh
+++ b/docker-run.sh
@@ -2,6 +2,7 @@
set -euf -o pipefail
+# shellcheck source=jenkins-helpers.sh
. "$(dirname $0)"/jenkins-helpers.sh
convert_args_to_variables "$@"
shift "$SHIFT_CONVERTED_ARGS"
diff --git a/jenkins-helpers.sh b/jenkins-helpers.sh
index 4e0ad8ff..813a97f4 100644
--- a/jenkins-helpers.sh
+++ b/jenkins-helpers.sh
@@ -777,7 +777,7 @@ print_volume_mounts ()
prefix=$(echo $job | cut -d- -f 1)
fi
volume_id=$(print_docker_name "$prefix$suffix")
- mounts+=(ccache-$volume_id:$HOME/.ccache)
+ mounts+=(ccache-"$volume_id":"$HOME"/.ccache)
;;
esac
case "$job" in
@@ -913,6 +913,7 @@ EOF
num=2
;;
"@@")
+ # shellcheck disable=SC1090
source "$2"
echo "# Start of include $2" | manifest_out
cat "$2" | manifest_out
@@ -930,12 +931,13 @@ EOF
"^^")
if [ x"$2" = x"true" ]; then
# Check that we have a manifest to reproduce
- if [ x"$3" != x"%%" -o ! -f "$4" ]; then
+ if [ x"$3" != x"%%" ] || [ ! -f "$4" ]; then
echo "ERROR: '^^ true' must be followed by '%% <MANIFEST>'"
exit 1
fi
# Source the manifest for reproduction.
+ # shellcheck disable=SC1090
source "$4"
# Skip processing all following arguments.
@@ -1213,8 +1215,9 @@ run_step ()
run_step_count=$(($run_step_count+1))
- if [ x"$pretty_step" = x"$run_step_start_at" \
- -o x"$run_step_start_at" = x"" -a x"$run_step_prev_step" = x"" ]; then
+ if [ x"$pretty_step" = x"$run_step_start_at" ] || \
+ [ x"$run_step_start_at" = x"" ] && \
+ [ x"$run_step_prev_step" = x"" ]; then
run_step_active=true
fi
@@ -1265,7 +1268,7 @@ run_step ()
echo "SKIPPING ${step[*]}"
fi
- if [ x"$run_step_status" = x"0" -a x"$success_result" != x"x" ]; then
+ if [ x"$run_step_status" = x"0" ] && [ x"$success_result" != x"x" ]; then
cat >> $run_step_top_artifacts/results <<EOF
# ${step[@]}:
$success_result
diff --git a/jenkins.sh b/jenkins.sh
index 4be4bd04..33f103af 100755
--- a/jenkins.sh
+++ b/jenkins.sh
@@ -239,7 +239,7 @@ user_snapshots="${user_workspace}/snapshots"
arch="$(uname -m)"
-if [ x"$logserver" = x"" -a x"$logname" != x"" ]; then
+if [ x"$logserver" = x"" ] && [ x"$logname" != x"" ]; then
echo "ERROR: \$logname is not provided, but \$logserver is set to $logserver"
exit 1
fi
@@ -418,12 +418,13 @@ $CONFIG_SHELL ${abe_dir}/configure --with-local-snapshots=${user_snapshots} --wi
# load commonly used varibles set by configure
if test -e "${PWD}/host.conf"; then
+ # shellcheck disable=SC1090
. "${PWD}/host.conf"
fi
# We used to delete *.sum files, but this should not be necessary. This
# check is transitional, and will be removed later.
-if [ ! -z "$(find ${user_workspace} -name \*.sum)" ]; then
+if [ -n "$(find ${user_workspace} -name \*.sum)" ]; then
echo "Found *.sum files, but workspace should be empty!"
exit 1
fi
@@ -527,14 +528,14 @@ fi
if test x"${logserver}" != x"" ; then
if test x"${tarsrc}" = xtrue -a x"${release}" != x; then
allfiles="$(ls ${user_snapshots}/*${release}*.xz)"
- srcfiles="$(echo ${allfiles} | egrep -v "arm|aarch")"
+ srcfiles="$(echo ${allfiles} | grep -E -v "arm|aarch")"
scp $logopts ${srcfiles} ${logserver}:/home/abe/var/snapshots/ || status=1
rm -f ${srcfiles} || status=1
fi
if test x"${tarbin}" = xtrue -a x"${release}" != x; then
allfiles="$(ls ${user_snapshots}/*${release}*.xz)"
- binfiles="$(echo ${allfiles} | egrep "arm|aarch")"
+ binfiles="$(echo ${allfiles} | grep -E "arm|aarch")"
scp $logopts ${binfiles} ${logserver}:/work/space/binaries/ || status=1
rm -f ${binfiles} || status=1
fi
diff --git a/round-robin-bisect.sh b/round-robin-bisect.sh
index 25bb69c6..d48278b5 100755
--- a/round-robin-bisect.sh
+++ b/round-robin-bisect.sh
@@ -3,6 +3,7 @@
set -ef -o pipefail
scripts=$(dirname $0)
+# shellcheck source=jenkins-helpers.sh
. $scripts/jenkins-helpers.sh
# Relative artifacts are used for generation of manifests and reproduction
@@ -290,7 +291,7 @@ push_interesting_commit ()
if [ x"$kind" = x"regression" ]; then
configs=($(grep "^$sha1" ../interesting-commits/$current_project | sed -e "s/^$sha1 *//"))
- configs+=(${rr[ci_project]}/${rr[ci_config]})
+ configs+=("${rr[ci_project]}"/"${rr[ci_config]}")
configs=($(echo "${configs[@]}" | tr ' ' '\n' | sort -u))
sed -i -e "s#^$sha1.*\$#$sha1 ${configs[*]}#" ../interesting-commits/$current_project
fi
@@ -506,7 +507,7 @@ Could not identify regression in *$current_project* in CI configuration ${rr[ci_
EOF
fi
-if [ x"${JIRA_PASSWORD+set}" = x"set" -a -f $artifacts/first-bad ]; then
+if [ x"${JIRA_PASSWORD+set}" = x"set" ] && [ -f $artifacts/first-bad ]; then
case "${rr[ci_project]}/${rr[ci_config]}" in
tcwg_kernel/gnu-*) jira_card="GNU-587" ;;
tcwg_kernel/llvm-*) jira_card="LLVM-480" ;;
diff --git a/round-robin.sh b/round-robin.sh
index 9d067c5e..4093340b 100644
--- a/round-robin.sh
+++ b/round-robin.sh
@@ -169,8 +169,8 @@ clone_repo ()
# developers without ssh keys on Linaro git servers to reproduce builds
# in --mode "baseline".
local read_only="true"
- if [ x"${rr[${project}_branch]}" != x"baseline" -a \
- x"${rr[mode]}" = x"jenkins-full" ]; then
+ if [ x"${rr[${project}_branch]}" != x"baseline" ] && \
+ [ x"${rr[mode]}" = x"jenkins-full" ]; then
read_only=false
fi
@@ -329,7 +329,7 @@ build_abe ()
shift
done
- if [ x"$project" = x"gcc" -a $# != 0 ]; then
+ if [ x"$project" = x"gcc" ] && [ $# != 0 ]; then
stage="$stage $*"
fi
@@ -579,7 +579,7 @@ check_regression ()
if [ $score -lt 0 ] 2>/dev/null; then
# Don't bisect uninteresting regressions.
:
- elif [ x"$single_component" = x"" -o x"${rr[mode]}" = x"bisect" ]; then
+ elif [ x"$single_component" = x"" ] || [ x"${rr[mode]}" = x"bisect" ]; then
local -a update_components
while read -a update_components; do
diff --git a/sanity-check.sh b/sanity-check.sh
index b3c34654..54abb4f3 100755
--- a/sanity-check.sh
+++ b/sanity-check.sh
@@ -8,26 +8,33 @@ set -euf -o pipefail
# ./sanity-check.sh script1.sh script2.sh
if [[ "$#" -eq 0 ]]; then
- files=($(find "$(dirname "$0")" -name "*.sh" -o -name "*.job"))
+ files=()
+ while IFS='' read -r line; do files+=("$line"); done < <(\
+ find "$(dirname "$0")" -name "*.sh" -o -name "*.job")
else
files=("${@}")
fi
-#TODO: newer versions of shellcheck can set a minimum message level
-ignored=(
-# All STYLE warnings seen so far
--e SC2001 # See if you can use ${variable//search/replace} instead.
--e SC2002 # Useless cat. Consider 'cmd < file | ..' or 'cmd file | ..' instead.
--e SC2004 # $/${} is unnecessary on arithmetic variables.
--e SC2006 # Use $(..) instead of legacy `..`.
-# All INFO warnings seen so far
--e SC2016 # Expressions don't expand in single quotes, use double quotes for that.
--e SC2086 # Double quote to prevent globbing and word splitting.
--e SC2102 # Ranges can only match single chars (mentioned due to duplicates).
--e SC2094 # Make sure not to read and write the same file in the same pipeline.
--e SC2029 # Note that, unescaped, this expands on the client side.
--e SC2030 # Modification of PATH is local (to subshell caused by (..) group).
--e SC2031 # baseline_branch was modified in a subshell. That change might be lost.
-)
+# New versions can set a minimum level
+if (shellcheck 2>&1 || true) | grep -q -- --severity=SEVERITY; then
+ ignore=(--severity=warning)
+else
+ # Manual list for older versions
+ ignore=(
+ # All STYLE warnings seen so far
+ -e SC2001 # See if you can use ${variable//search/replace} instead.
+ -e SC2002 # Useless cat. Consider 'cmd < file | ..' or 'cmd file | ..' instead.
+ -e SC2004 # $/${} is unnecessary on arithmetic variables.
+ -e SC2006 # Use $(..) instead of legacy `..`.
+ # All INFO warnings seen so far
+ -e SC2016 # Expressions don't expand in single quotes, use double quotes for that.
+ -e SC2086 # Double quote to prevent globbing and word splitting.
+ -e SC2102 # Ranges can only match single chars (mentioned due to duplicates).
+ -e SC2094 # Make sure not to read and write the same file in the same pipeline.
+ -e SC2029 # Note that, unescaped, this expands on the client side.
+ -e SC2030 # Modification of PATH is local (to subshell caused by (..) group).
+ -e SC2031 # baseline_branch was modified in a subshell. That change might be lost.
+ )
+fi
-shellcheck "${files[@]}" "${ignored[@]}"
+shellcheck "${files[@]}" "${ignore[@]}"
diff --git a/start-container-qemu.sh b/start-container-qemu.sh
index 94cbecb6..436198dc 100755
--- a/start-container-qemu.sh
+++ b/start-container-qemu.sh
@@ -42,6 +42,7 @@ container=$(mktemp)
# shellcheck disable=SC2064
trap "rm $container; cleanup_all_containers" EXIT
+# shellcheck disable=SC1090
. "$container"
declare host
diff --git a/tcwg-benchmark-results.sh b/tcwg-benchmark-results.sh
index 7f7c0e1b..f2b4430f 100755
--- a/tcwg-benchmark-results.sh
+++ b/tcwg-benchmark-results.sh
@@ -5,6 +5,7 @@
set -euf -o pipefail
scripts=$(dirname $0)
+# shellcheck source=jenkins-helpers.sh
. $scripts/jenkins-helpers.sh
convert_args_to_variables "$@"
diff --git a/tcwg-buildfarm.sh b/tcwg-buildfarm.sh
index bf0fb589..6b5b88e6 100755
--- a/tcwg-buildfarm.sh
+++ b/tcwg-buildfarm.sh
@@ -49,9 +49,9 @@ host=$(print_type_for_label $label)
if [ x"$target" = x"$label" ]; then
target_opt=(--target native)
elif [ x"$target" = x"aarch64-linux-gnu_ilp32" ]; then
- target_opt=(--target $target --override "--extraconfigdir ../config/ilp32-dev")
+ target_opt=(--target "$target" --override "--extraconfigdir ../config/ilp32-dev")
else
- target_opt=(--target $target)
+ target_opt=(--target "$target")
fi
runtests_opt=""
diff --git a/tcwg-cleanup-stale-containers.sh b/tcwg-cleanup-stale-containers.sh
index a0a56943..2b1a87c8 100755
--- a/tcwg-cleanup-stale-containers.sh
+++ b/tcwg-cleanup-stale-containers.sh
@@ -109,7 +109,7 @@ do_cleanup_containers ()
;;
esac
fi
- rm_containers=("${rm_containers[@]}" $container)
+ rm_containers=("${rm_containers[@]}" "$container")
fi
done
@@ -210,7 +210,7 @@ fi
# Check if we have more containers than max_containers
nb_containers=$($DOCKER ps -a | wc -l)
-if [ ${max_containers} -gt 0 -a ${nb_containers} -gt ${max_containers} ]; then
+if [ ${max_containers} -gt 0 ] && [ ${nb_containers} -gt ${max_containers} ]; then
echo "ERROR: Too many containers left after cleanup: ${nb_containers} (max: ${max_containers})"
status=$(($status|32))
fi
diff --git a/tcwg-dev-build.sh b/tcwg-dev-build.sh
index d37732a7..d67244df 100755
--- a/tcwg-dev-build.sh
+++ b/tcwg-dev-build.sh
@@ -3,6 +3,7 @@
set -ef -o pipefail
scripts=$(dirname $0)
+# shellcheck source=jenkins-helpers.sh
. $scripts/jenkins-helpers.sh
convert_args_to_variables "$@"
diff --git a/tcwg-generate-source-cache.sh b/tcwg-generate-source-cache.sh
index 526f2081..45a8b2fe 100755
--- a/tcwg-generate-source-cache.sh
+++ b/tcwg-generate-source-cache.sh
@@ -3,6 +3,7 @@
set -e
scripts=$(dirname $0)
+# shellcheck source=jenkins-helpers.sh
. $scripts/jenkins-helpers.sh
usage ()
diff --git a/tcwg-llvm-build.sh b/tcwg-llvm-build.sh
index c821bde9..11de84e6 100755
--- a/tcwg-llvm-build.sh
+++ b/tcwg-llvm-build.sh
@@ -8,6 +8,7 @@ set -exu
set -o pipefail
BASEDIR=$(dirname "$(readlink -f "$0")")
+# shellcheck source=tcwg-llvm-common.sh
. "$BASEDIR/tcwg-llvm-common.sh"
# Syntax
diff --git a/tcwg-llvm-release.sh b/tcwg-llvm-release.sh
index a917d25d..488cfd1f 100755
--- a/tcwg-llvm-release.sh
+++ b/tcwg-llvm-release.sh
@@ -9,6 +9,7 @@ set -exu
set -o pipefail
BASEDIR=$(dirname "$(readlink -f "$0")")
+# shellcheck disable=SC1090
. "$BASEDIR/tcwg-llvm-common.sh"
# Syntax
diff --git a/tcwg-llvm-testsuite.sh b/tcwg-llvm-testsuite.sh
index d6bf0cf6..e1af1d93 100755
--- a/tcwg-llvm-testsuite.sh
+++ b/tcwg-llvm-testsuite.sh
@@ -9,6 +9,7 @@ set -o pipefail
set -u
BASEDIR=$(dirname "$(readlink -f "$0")")
+# shellcheck disable=SC1090
. "$BASEDIR/tcwg-llvm-common.sh"
# Syntax
@@ -24,6 +25,7 @@ NT_FLAGS=""
# Command line parsing
while [ "$#" -gt 0 ]; do
+ # shellcheck disable=SC2162
IFS="=" read ARG VAL <<< "$1"
case "$ARG" in
--workspace)
diff --git a/tcwg-start-container.sh b/tcwg-start-container.sh
index 008e78c4..4eb84537 100755
--- a/tcwg-start-container.sh
+++ b/tcwg-start-container.sh
@@ -2,6 +2,7 @@
set -ef -o pipefail
+# shellcheck source=jenkins-helpers.sh
. "$(dirname $0)"/jenkins-helpers.sh
convert_args_to_variables "$@"
shift "$SHIFT_CONVERTED_ARGS"
diff --git a/tcwg-update-host-containers.sh b/tcwg-update-host-containers.sh
index 3abb684c..c67e3673 100755
--- a/tcwg-update-host-containers.sh
+++ b/tcwg-update-host-containers.sh
@@ -3,6 +3,7 @@
set -ef -o pipefail
scripts=$(dirname $0)
+# shellcheck source=jenkins-helpers.sh
. $scripts/jenkins-helpers.sh
convert_args_to_variables "$@"
diff --git a/tcwg-update-llvmbot-containers.sh b/tcwg-update-llvmbot-containers.sh
index 7b703410..037a5daa 100755
--- a/tcwg-update-llvmbot-containers.sh
+++ b/tcwg-update-llvmbot-containers.sh
@@ -3,6 +3,7 @@
set -euf -o pipefail
scripts=$(dirname $0)
+# shellcheck source=jenkins-helpers.sh
. $scripts/jenkins-helpers.sh
convert_args_to_variables "$@"
diff --git a/tcwg-update-tested.sh b/tcwg-update-tested.sh
index 26d75065..286eaebc 100755
--- a/tcwg-update-tested.sh
+++ b/tcwg-update-tested.sh
@@ -2,6 +2,7 @@
set -ef -o pipefail
+# shellcheck source=jenkins-helpers.sh
. "$(dirname $0)"/jenkins-helpers.sh
convert_args_to_variables "$@"
diff --git a/tcwg-upstream2gerrit.sh b/tcwg-upstream2gerrit.sh
index c446b207..03c5b893 100755
--- a/tcwg-upstream2gerrit.sh
+++ b/tcwg-upstream2gerrit.sh
@@ -2,6 +2,7 @@
set -ef -o pipefail
+# shellcheck source=jenkins-helpers.sh
. "$(dirname $0)"/jenkins-helpers.sh
convert_args_to_variables "$@"
@@ -124,7 +125,7 @@ if $filter; then
wanted2=0
# Search the same strings with '_' prefix or suffix, excluding string with 'parm'
egrep '^[-+]' /tmp/mydiff.$$ | egrep -i '_arm|arm_|_thumb|thumb_|_aarch64|aarch64_' | grep -v -i 'parm' || wanted2=$?
- if [ $wanted1 -eq 0 -o $wanted2 -eq 0 ]
+ if [ $wanted1 -eq 0 ] || [ $wanted2 -eq 0 ]
then
keepit=true
else
diff --git a/tcwg_bmk-build.sh b/tcwg_bmk-build.sh
index 4159cfea..9c23877d 100755
--- a/tcwg_bmk-build.sh
+++ b/tcwg_bmk-build.sh
@@ -3,7 +3,9 @@
set -euf -o pipefail
scripts=$(dirname $0)
+# shellcheck source=jenkins-helpers.sh
. $scripts/jenkins-helpers.sh
+# shellcheck source=round-robin.sh
. $scripts/round-robin.sh
convert_args_to_variables "$@"
@@ -141,7 +143,7 @@ benchmark ()
(
set -euf -o pipefail
- local cflags="$1"
+ local bmk_cflags="$1"
local results_id_file="$3"
# Sanity check
@@ -155,8 +157,8 @@ benchmark ()
mkdir "$(pwd)"/bin
local bmk_flags bmk_ldflags reboot run_profile
- bmk_flags="$(echo $cflags | sed -e "s/_/ -/g" -e "s/LTO/flto/g")"
- case "$cflags" in
+ bmk_flags="$(echo $bmk_cflags | sed -e "s/_/ -/g" -e "s/LTO/flto/g")"
+ case "$bmk_cflags" in
"-Os"*|"-Oz"*)
reboot=false
run_profile="parallel9x4"
diff --git a/tcwg_gnu-build.sh b/tcwg_gnu-build.sh
index ccecf31a..f88c8e81 100755
--- a/tcwg_gnu-build.sh
+++ b/tcwg_gnu-build.sh
@@ -3,7 +3,9 @@
set -euf -o pipefail
scripts=$(dirname $0)
+# shellcheck source=jenkins-helpers.sh
. $scripts/jenkins-helpers.sh
+# shellcheck source=round-robin.sh
. $scripts/round-robin.sh
convert_args_to_variables "$@"
diff --git a/tcwg_kernel-build.sh b/tcwg_kernel-build.sh
index f6d5aea7..14c24489 100755
--- a/tcwg_kernel-build.sh
+++ b/tcwg_kernel-build.sh
@@ -3,7 +3,9 @@
set -euf -o pipefail
scripts=$(dirname $0)
+# shellcheck source=jenkins-helpers.sh
. $scripts/jenkins-helpers.sh
+# shellcheck source=round-robin.sh
. $scripts/round-robin.sh
convert_args_to_variables "$@"
@@ -137,8 +139,8 @@ build_linux_1 ()
# Otherwise the compiler is new in every build and we would
# only clobber ccache volume.
local ccache=""
- if [ x"${rr[mode]}" != x"jenkins-full" \
- -a x"$(print_single_updated_component)" = x"linux" ]; then
+ if [ x"${rr[mode]}" != x"jenkins-full" ] && \
+ [ x"$(print_single_updated_component)" = x"linux" ]; then
ccache="ccache"
fi
cat > "$(pwd)"/bin/${rr[target]}-cc <<EOF