mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-14 01:01:27 +00:00
scripts/run-regression-tests: Make the CentOS build less noisy
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8893 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -263,6 +263,7 @@ function patch_and_configure_kernel {
|
||||
kver="$(kernel_version "$1")"
|
||||
local patchfile="${outputdir}/scst-$1-kernel-matching-line-numbers.patch"
|
||||
local patchoutput="${outputdir}/patch-command-output-$1.txt"
|
||||
local configureoutput="${outputdir}/configure-output.txt"
|
||||
local disable=" \
|
||||
CONFIG_BINARY_PRINTF \
|
||||
CONFIG_BLK_DEV_IO_TRACE \
|
||||
@@ -315,7 +316,10 @@ CONFIG_X86_X32 \
|
||||
(
|
||||
cd "${outputdir}/linux-$1" &&
|
||||
if [ "${multiple_patches}" = "false" ]; then
|
||||
patch -p1 -f -s <"${patchfile}" >"${patchoutput}"
|
||||
if ! patch -p1 -f -s <"${patchfile}" >"${patchoutput}"; then
|
||||
echo "Error: applying ${patchfile} failed."
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
rm -f "${patchoutput}"
|
||||
for p in "${outputdir}/${patchdir}"/*; do
|
||||
@@ -326,7 +330,11 @@ CONFIG_X86_X32 \
|
||||
make -s allmodconfig &>"${outputdir}/make-config-output.txt" &&
|
||||
for c in $disable; do sed -i.tmp "s/^$c=[ym]\$/$c=n/" .config; done &&
|
||||
for c in $enable; do sed -i.tmp "s/^\(# \)*$c\(=.*\| is not set\)\$/$c=y/" .config; done &&
|
||||
make -s oldconfig </dev/null &>/dev/null
|
||||
make -s oldconfig </dev/null &>"${configureoutput}" &&
|
||||
for c in $enable; do
|
||||
grep -q "^$c=[ym]" .config ||
|
||||
echo "Enabling $c failed."
|
||||
done
|
||||
)
|
||||
}
|
||||
|
||||
@@ -424,7 +432,7 @@ function run_smatch {
|
||||
kver="$(kernel_version "$1")"
|
||||
plevel="$(patchlevel "$1")"
|
||||
local outputfile="${outputdir}/smatch-$1-output.txt"
|
||||
local disable="CONFIG_DYNAMIC_DEBUG"
|
||||
local disable="" # "CONFIG_DYNAMIC_DEBUG"
|
||||
shift
|
||||
|
||||
echo "Running smatch on the patched kernel in $* ..."
|
||||
@@ -675,12 +683,21 @@ do
|
||||
if [ "${run_checkpatch}" = "true" ]; then
|
||||
run_checkpatch "$k"
|
||||
fi
|
||||
patch_and_configure_kernel "$k"
|
||||
patch_and_configure_kernel "$k" || continue
|
||||
case "$k" in
|
||||
*^*)
|
||||
# CentOS.
|
||||
;;
|
||||
2.*|3.*)
|
||||
# Tell the kernel that we are using gcc 4.6.
|
||||
# Tell the kernel that we are using gcc 4.6 since older kernel
|
||||
# versions do not suppor recent gcc versions.
|
||||
KCFLAGS="-U__GNUC__ -U__GNUC_MINOR__ -D__GNUC__=4 -D__GNUC_MINOR__=6"
|
||||
esac
|
||||
case "$k" in
|
||||
3.10.0-*)
|
||||
# Make the CentOS 7.x build less noisy.
|
||||
KCFLAGS+=" -Wno-deprecated-declarations";
|
||||
esac
|
||||
# See also commit bd664f6b3e37 ("disable new gcc-7.1.1 warnings for now";
|
||||
# v4.13) and commit 6f303d60534c ("gcc-9: silence 'address-of-packed-member'
|
||||
# warning"; v5.1).
|
||||
|
||||
Reference in New Issue
Block a user