]> git.ipfire.org Git - thirdparty/knot-dns.git/commitdiff
distro/tests: new python-libknot test
authorJakub Ružička <jakub.ruzicka@nic.cz>
Fri, 13 Jun 2025 10:58:06 +0000 (12:58 +0200)
committerDaniel Salzman <daniel.salzman@nic.cz>
Fri, 13 Jun 2025 17:39:15 +0000 (19:39 +0200)
distro/pkg/deb/tests/control
distro/pkg/deb/tests/python-libknot [new file with mode: 0755]
distro/tests/extra/all/control
distro/tests/python-libknot [new symlink]

index e8b3dcbd786fd274678188a624b997a866a5040d..76bc1181bf61f41c9c8681c399e171d9ee520540 100644 (file)
@@ -11,3 +11,7 @@ Depends:
  knot,
  knot-dnsutils,
  knot-dnssecutils,
+
+Tests: python-libknot
+Depends:
+ python3-libknot,
diff --git a/distro/pkg/deb/tests/python-libknot b/distro/pkg/deb/tests/python-libknot
new file mode 100755 (executable)
index 0000000..0df0c59
--- /dev/null
@@ -0,0 +1,8 @@
+#!/usr/bin/env python3
+
+import libknot.control
+import libknot.dname
+import libknot.probe
+
+dname = libknot.dname.KnotDname("knot-dns.cz")
+print("%s: wire: %s size: %u" % (dname.str(), dname.wire(), dname.size()))
index cef30243d283040572d9f7f1c5b7997f0bea421b..8a97167b94fa11caf44654a3d11295ad59de4a8f 100644 (file)
@@ -8,3 +8,5 @@ Depends: iputils
 
 Tests: authoritative-server
 Depends: findutils
+
+Tests: python-libknot
diff --git a/distro/tests/python-libknot b/distro/tests/python-libknot
new file mode 120000 (symlink)
index 0000000..0d92e33
--- /dev/null
@@ -0,0 +1 @@
+../pkg/deb/tests/python-libknot
\ No newline at end of file