Skip to content

Commit

Permalink
merge_config.sh: Check error codes from make
Browse files Browse the repository at this point in the history
When we execute make after merging the configurations we ignore any
errors it produces causing whatever is running merge_config.sh to be
unaware of any failures.  This issue was noticed by Guillaume Tucker
while looking at problems with testing of clang only builds in KernelCI
which caused Kbuild to be unable to find a working host compiler.

This implementation was suggested by Yamada-san.

Suggested-by: Masahiro Yamada <[email protected]>
Reported-by: Guillaume Tucker <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
Signed-off-by: Masahiro Yamada <[email protected]>
  • Loading branch information
broonie authored and masahir0y committed Aug 21, 2019
1 parent eb27ea5 commit cdfca82
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions scripts/kconfig/merge_config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
# Copyright (c) 2009-2010 Wind River Systems, Inc.
# Copyright 2011 Linaro

set -e

clean_up() {
rm -f $TMP_FILE
rm -f $MERGE_FILE
exit
}
trap clean_up HUP INT TERM

usage() {
echo "Usage: $0 [OPTIONS] [CONFIG [...]]"
Expand Down Expand Up @@ -110,6 +110,9 @@ TMP_FILE=$(mktemp ./.tmp.config.XXXXXXXXXX)
MERGE_FILE=$(mktemp ./.merge_tmp.config.XXXXXXXXXX)

echo "Using $INITFILE as base"

trap clean_up EXIT

cat $INITFILE > $TMP_FILE

# Merge files, printing warnings on overridden values
Expand Down Expand Up @@ -155,7 +158,6 @@ if [ "$RUNMAKE" = "false" ]; then
echo "#"
echo "# merged configuration written to $KCONFIG_CONFIG (needs make)"
echo "#"
clean_up
exit
fi

Expand Down Expand Up @@ -185,5 +187,3 @@ for CFG in $(sed -n -e "$SED_CONFIG_EXP1" -e "$SED_CONFIG_EXP2" $TMP_FILE); do
echo ""
fi
done

clean_up

0 comments on commit cdfca82

Please sign in to comment.