debian: add the DEP-8 tests-control parser

Parse debian/tests/control into runnable test descriptions: one test
per Tests: script and per Test-Command value, carrying the shared
Depends/Restrictions/Tests-Directory stanza fields and the autopkgtest
command1 enumeration (test-name overrides advance the counter).
Depends substitution is deliberately left raw: expanding @ and friends
needs the built binary list, so it belongs to the runner.

First piece of pkh test (see plans/pkh-test.md); the runner expands
these stanzas against the deb822 primitives.
This commit is contained in:
2026-09-27 20:35:01 +02:00
parent 1c8f4cf35b
commit 067e0614e6
3 changed files with 270 additions and 1 deletions
+3
View File
@@ -10,6 +10,7 @@
//! - [`files`]: `debian/files` artifact registry (`Dpkg::Dist::Files`)
//! - [`version`]: Debian version splitting/validation/comparison
//! - [`changelog`]: `debian/changelog` entry parsing
//! - [`tests_control`]: DEP-8 test metadata (`debian/tests/control`)
pub mod arch;
pub mod changelog;
@@ -17,6 +18,7 @@ pub mod checksums;
pub mod control;
pub mod deps;
pub mod files;
pub mod tests_control;
pub mod version;
pub use changelog::{
@@ -28,4 +30,5 @@ pub use control::{
ControlInfo, Paragraph, parse_paragraphs, strip_clearsigned_armour, write_paragraph,
};
pub use files::{FilesEntry, FilesList};
pub use tests_control::{Test, TestsControl};
pub use version::DebianVersion;