Skip to content

Commit

Permalink
tests: omit possibly set CC/LD/... 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 <[email protected]>
  • Loading branch information
evelikov committed Jun 6, 2024
1 parent 4b0a8d9 commit f9fe97b
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions run_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ TEST_TMPFILES=(
# Reportedly in some cases the entries in the modinfo output are ordered
# differently. Fetch whatever we need and sort them.
modinfo_quad() {
modinfo $1 | egrep "^description:|^filename:|^license:|^version:" | sort
modinfo $1 | grep -E "^description:|^filename:|^license:|^version:" | sort
}

SIGNING_MESSAGE=""
Expand Down 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/... flags (if set) with a placeholder message
sed -i "s|\(make -j1 KERNELRELEASE=${KERNEL_VER} all\).*|\1 <omitting possibly set CC/LD/... 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/... 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/... 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/... 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 f9fe97b

Please sign in to comment.