mirror of
https://github.com/dynup/kpatch
synced 2025-05-01 15:37:57 +00:00
die on create-diff-object when all objects have processed
When working on large patches that are bound to have lots of errors, it can be frustrating to have to re-run the build and wait after every error you fix. With this patch, you get a chance to see most (if not all) of the errors you'll be facing, at least across the different object files.
This commit is contained in:
parent
6c6299651b
commit
c0113db4ad
@ -427,6 +427,7 @@ cd "$TEMPDIR"
|
||||
mkdir output
|
||||
declare -A objnames
|
||||
CHANGED=0
|
||||
ERROR=0
|
||||
for i in $FILES; do
|
||||
mkdir -p "output/$(dirname $i)"
|
||||
cd "$OBJDIR"
|
||||
@ -450,13 +451,17 @@ for i in $FILES; do
|
||||
die "no core file found, run 'ulimit -c unlimited' and try to recreate"
|
||||
fi
|
||||
# create-diff-object returns 3 if no functional change is found
|
||||
[[ $rc -eq 0 ]] || [[ $rc -eq 3 ]] || die
|
||||
[[ $rc -eq 0 ]] || [[ $rc -eq 3 ]] || ERROR=$(expr $ERROR "+" 1)
|
||||
if [[ $rc -eq 0 ]]; then
|
||||
CHANGED=1
|
||||
objnames[$KOBJFILE]=1
|
||||
fi
|
||||
done
|
||||
|
||||
if [[ $ERROR -ne 0 ]]; then
|
||||
die "create-diff-object failed on $ERROR of the objects"
|
||||
fi
|
||||
|
||||
if [[ $CHANGED -eq 0 ]]; then
|
||||
die "no functional changes found"
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user