Skip to content

Commit

Permalink
tests: omit possibly set CC/LD/OBJDUMP flags
Browse files Browse the repository at this point in the history
The chances of failure when the flags are set is reasonably small
(famous last words), so omit them. This allows us to handle any
variation without adding heaps of extra code.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
  • Loading branch information
evelikov committed Jun 6, 2024
1 parent 922f559 commit 2b535c7
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions run_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,9 @@ generalize_expected_output() {
# Apport related error that can occur in the CI. Drop from the output to be more generic
sed -i "/^python3: can't open file '\/usr\/share\/apport\/package-hooks\/dkms_packages.py'\: \[Errno 2\] No such file or directory$/d" ${output_log}
sed -i "/^ERROR (dkms apport): /d" ${output_log}

# Swap any CC/LD/OBJDUMP flags (if set) with a placeholder message
sed -i "s/i\(make -j1 KERNELRELEASE=${KERNEL_VER} all\).*/\1 <omitting possibly set CC/LD/OBJDUMP flags>/" ${output_log}
}

run_with_expected_output() {
Expand Down Expand Up @@ -1425,7 +1428,7 @@ Building module:
Cleaning build area...
Building module(s)...(bad exit status: 2)
Failed command:
make -j1 KERNELRELEASE=${KERNEL_VER} all
make -j1 KERNELRELEASE=${KERNEL_VER} all <omitting possibly set CC/LD/OBJDUMP flags>
Error! Bad return status for module build on kernel: ${KERNEL_VER} (${KERNEL_ARCH})
Consult /var/lib/dkms/dkms_failing_test/1.0/build/make.log for more information.
dkms autoinstall on ${KERNEL_VER}/${KERNEL_ARCH} failed for dkms_failing_test(10)
Expand All @@ -1444,7 +1447,7 @@ Building module:
Cleaning build area...
Building module(s)...(bad exit status: 2)
Failed command:
make -j1 KERNELRELEASE=${KERNEL_VER} all
make -j1 KERNELRELEASE=${KERNEL_VER} all <omitting possibly set CC/LD/OBJDUMP flags>
Error! Bad return status for module build on kernel: ${KERNEL_VER} (${KERNEL_ARCH})
Consult /var/lib/dkms/dkms_failing_test/1.0/build/make.log for more information.
dkms autoinstall on ${KERNEL_VER}/${KERNEL_ARCH} failed for dkms_failing_test(10)
Expand Down Expand Up @@ -1593,7 +1596,7 @@ Building module:
Cleaning build area...
Building module(s)...(bad exit status: 2)
Failed command:
make -j1 KERNELRELEASE=${KERNEL_VER} all
make -j1 KERNELRELEASE=${KERNEL_VER} all <omitting possibly set CC/LD/OBJDUMP flags>
Error! Bad return status for module build on kernel: ${KERNEL_VER} (${KERNEL_ARCH})
Consult /var/lib/dkms/dkms_failing_test/1.0/build/make.log for more information.
Expand Down

0 comments on commit 2b535c7

Please sign in to comment.