Bladeren bron

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>
Alexis Lothoré 1 maand geleden
bovenliggende
commit
74d7259a33
1 gewijzigde bestanden met toevoegingen van 21 en 0 verwijderingen
  1. 21 0
      support/testing/tests/package/test_libldns.py

+ 21 - 0
support/testing/tests/package/test_libldns.py

@@ -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")