mirror of
https://github.com/dynup/kpatch
synced 2025-04-25 04:27:56 +00:00
test/integration: include build log on failures
If a patch build fails copy the build log to <prefix>.log file. Signed-off-by: Artem Savkov <asavkov@redhat.com>
This commit is contained in:
parent
3a45a6ebb3
commit
6cbf55d77b
@ -51,7 +51,7 @@ unset CCACHE_HASHDIR
|
|||||||
KPATCHBUILD="$ROOTDIR"/kpatch-build/kpatch-build
|
KPATCHBUILD="$ROOTDIR"/kpatch-build/kpatch-build
|
||||||
ERROR=0
|
ERROR=0
|
||||||
LOG=test.log
|
LOG=test.log
|
||||||
rm -f $LOG
|
rm -f *.log
|
||||||
|
|
||||||
PATCHDIR="${PATCHDIR:-$PWD}"
|
PATCHDIR="${PATCHDIR:-$PWD}"
|
||||||
declare -a PATCH_LIST
|
declare -a PATCH_LIST
|
||||||
@ -152,7 +152,10 @@ build_module() {
|
|||||||
log "build: $prefix"
|
log "build: $prefix"
|
||||||
|
|
||||||
if ! $KPATCHBUILD -n $modname $file >> $LOG 2>&1; then
|
if ! $KPATCHBUILD -n $modname $file >> $LOG 2>&1; then
|
||||||
[[ $shouldfail -eq 0 ]] && error "$prefix: build failed"
|
if [[ $shouldfail -eq 0 ]]; then
|
||||||
|
error "$prefix: build failed"
|
||||||
|
cp $HOME/.kpatch/build.log $prefix.log
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
[[ $shouldfail -eq 1 ]] && error "$prefix: build succeeded when it should have failed"
|
[[ $shouldfail -eq 1 ]] && error "$prefix: build succeeded when it should have failed"
|
||||||
fi
|
fi
|
||||||
@ -239,6 +242,7 @@ build_combined_module() {
|
|||||||
|
|
||||||
if ! $KPATCHBUILD -n test-COMBINED "${COMBINED_LIST[@]}" >> $LOG 2>&1; then
|
if ! $KPATCHBUILD -n test-COMBINED "${COMBINED_LIST[@]}" >> $LOG 2>&1; then
|
||||||
error "combined build failed"
|
error "combined build failed"
|
||||||
|
cp $HOME/.kpatch/build.log combined.log
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user