support/testing: add basic runtime test for libldns/drill

Add a simple test ensuring that
- libldns is correctly built and installed
- drill is correctly built and installed
- drill is able to execute on the target

Reviewed-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com>
Signed-off-by: Julien Olivain <ju.o@free.fr>
This commit is contained in:
Alexis Lothoré
2025-12-09 09:54:12 +01:00
committed by Julien Olivain
parent 70a689f9dc
commit 74d7259a33

View File

@@ -0,0 +1,21 @@
import infra.basetest
import os
class TestLibLdns(infra.basetest.BRTest):
config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \
"""
BR2_PACKAGE_LIBLDNS=y
BR2_PACKAGE_LIBLDNS_DRILL=y
BR2_TARGET_ROOTFS_CPIO=y
# BR2_TARGET_ROOTFS_TAR is not set
"""
def test_run(self):
cpio_file = os.path.join(self.builddir, "images", "rootfs.cpio")
self.emulator.boot(arch="armv5",
kernel="builtin",
options=["-initrd", cpio_file])
self.emulator.login()
self.assertRunOk("drill -v")