testing: simplify combined integration test

Now that kpatch-build can accept multiple patches on the command line,
ditch the combinediff and associated logic in the integration test
script.

Signed-off-by: Joe Lawrence <joe.lawrence@redhat.com>
This commit is contained in:
Joe Lawrence 2017-09-22 16:39:58 -04:00
parent 2f8170e962
commit eda8357743
1 changed files with 1 additions and 31 deletions

View File

@ -135,8 +135,6 @@ build_module() {
prefix=$(basename ${file%%.patch}) prefix=$(basename ${file%%.patch})
module=kpatch-$prefix.ko module=kpatch-$prefix.ko
[[ $prefix = COMBINED ]] && return
if [[ $prefix =~ -FAIL ]]; then if [[ $prefix =~ -FAIL ]]; then
shouldfail=1 shouldfail=1
else else
@ -165,7 +163,6 @@ run_load_test() {
module=kpatch-$prefix.ko module=kpatch-$prefix.ko
testprog="$(dirname $1)/$prefix-LOADED.test" testprog="$(dirname $1)/$prefix-LOADED.test"
[[ $prefix = COMBINED ]] && return
[[ $prefix =~ -FAIL ]] && return [[ $prefix =~ -FAIL ]] && return
if [[ ! -e $module ]]; then if [[ ! -e $module ]]; then
@ -225,12 +222,6 @@ build_combined_module() {
return return
fi fi
if ! which combinediff > /dev/null; then
log "patchutils not installed, skipping combined module build"
error "PLEASE INSTALL PATCHUTILS"
return
fi
declare -a COMBINED_LIST declare -a COMBINED_LIST
for file in "${PATCH_LIST[@]}"; do for file in "${PATCH_LIST[@]}"; do
[[ $file =~ -FAIL ]] && log "combine: skipping $file" && continue [[ $file =~ -FAIL ]] && log "combine: skipping $file" && continue
@ -242,35 +233,14 @@ build_combined_module() {
return return
fi fi
rm -f COMBINED.patch TMP.patch
first=1
for file in "${COMBINED_LIST[@]}"; do
prefix=${file%%.patch}
log "combine: $prefix"
if [[ $first -eq 1 ]]; then
cp -f $file COMBINED.patch
first=0
continue
fi
combinediff COMBINED.patch $file > TMP.patch
mv -f TMP.patch COMBINED.patch
done
log "build: combined module" log "build: combined module"
if ! $KPATCHBUILD COMBINED.patch >> $LOG 2>&1; then if ! $KPATCHBUILD -n kpatch-COMBINED "${COMBINED_LIST[@]}" >> $LOG 2>&1; then
error "combined build failed" error "combined build failed"
fi fi
} }
run_combined_test() { run_combined_test() {
if [[ ! -e COMBINED.patch ]]; then
return
fi
if [[ ! -e kpatch-COMBINED.ko ]]; then if [[ ! -e kpatch-COMBINED.ko ]]; then
log "can't find kpatch-COMBINED.ko, skipping" log "can't find kpatch-COMBINED.ko, skipping"
return return