summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDenys Fedoryshchenko <denys.f@collabora.com>2026-10-28 20:47:22 +0200
committerDenys Fedoryshchenko <denys.f@collabora.com>2026-10-28 20:50:54 +0200
commit2fa7676c2d01f5757db99463a7ae4ab28841570d (patch)
tree535c9b8a3ec2cec5e368d2b1e0aba08c96b004d4 /tests
parent69cfe9cc7c03f663bcbc430291bc3a9460e433ba (diff)
downloadaccel-ppp-2fa7676c2d01f5757db99463a7ae4ab28841570d.tar.gz
accel-ppp-2fa7676c2d01f5757db99463a7ae4ab28841570d.zip
cmake: include PPPoSEQ in Debian and RPM package installs
Add the missing PPPoSEQ install rules and standalone driver metadata. Supply the running kernel release as the default RPM module destination. Extend the rootless install regression to verify Debian/CentOS packaging names, staged module paths, and exclusion after disabling the build flag. Validation: CTest passes; generated full and standalone DEBs contain ppposeq.ko and have the expected package names. RPM install rules were staged and checked; an RPM archive was not built because rpmbuild is unavailable. Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/README.md3
-rw-r--r--tests/kernel-module-install/test.sh31
2 files changed, 34 insertions, 0 deletions
diff --git a/tests/README.md b/tests/README.md
index d89958e1..44bae6a4 100644
--- a/tests/README.md
+++ b/tests/README.md
@@ -38,6 +38,9 @@ The kernel module installation regression test is rootless and does not need
kernel headers. It uses a fake kernel build tree to verify that `ipoe`,
`vlan_mon`, and `ppposeq` are installed from their actual build directories,
honor `DESTDIR`, and make installation fail when `modules_install` fails.
+It also verifies that Debian and CentOS packaging configurations include
+`ppposeq.ko` with the standalone driver package name, and omit it when the
+build flag is disabled.
Run it through CTest after configuring the project:
diff --git a/tests/kernel-module-install/test.sh b/tests/kernel-module-install/test.sh
index 1fbfd623..2f3ec579 100644
--- a/tests/kernel-module-install/test.sh
+++ b/tests/kernel-module-install/test.sh
@@ -36,3 +36,34 @@ if FAIL_MODULES_INSTALL=1 DESTDIR="${work_dir}/failed-stage" \
fi
grep -q 'Failed to install kernel module' "${work_dir}/failed-install.log"
+
+# Packaging configurations bypass modules_install and must install the .ko
+# explicitly, including when PPPoSEQ is built as a standalone driver package.
+for package_type in Debian12 Centos9; do
+ package_build="${work_dir}/package-${package_type}"
+ package_stage="${work_dir}/stage-${package_type}"
+ "${cmake_command}" \
+ -S "${source_dir}" \
+ -B "${package_build}" \
+ -DBUILD_TESTING=OFF \
+ -DBUILD_DRIVER_ONLY=TRUE \
+ -DBUILD_PPPOSEQ_DRIVER=TRUE \
+ -DIGNORE_GIT=TRUE \
+ -DCPACK_TYPE="${package_type}" \
+ -DMODULES_KDIR=test-kernel \
+ -DCENTOS_KDIR=test-kernel \
+ -DKDIR="${script_dir}"
+ "${cmake_command}" --build "${package_build}"
+ DESTDIR="${package_stage}" \
+ "${cmake_command}" --install "${package_build}"
+ test -f "${package_stage}/lib/modules/test-kernel/extra/ppposeq.ko"
+ grep -q 'set(CPACK_PACKAGE_NAME "accel-ppp-ppposeq-kmod")' \
+ "${package_build}/CPackConfig.cmake"
+
+ # A stale build artifact must not be installed after the flag is disabled.
+ "${cmake_command}" -S "${source_dir}" -B "${package_build}" \
+ -DBUILD_PPPOSEQ_DRIVER=FALSE
+ DESTDIR="${package_stage}-disabled" \
+ "${cmake_command}" --install "${package_build}"
+ test ! -e "${package_stage}-disabled/lib/modules/test-kernel/extra/ppposeq.ko"
+done