Compare commits

..

2 Commits

Author SHA1 Message Date
e2838bf5aa deb: test refactoring
Some checks failed
CI / build (push) Failing after 7m18s
2026-01-08 19:14:26 +01:00
a6df6070d4 build: fix signature handling 2026-01-08 18:53:19 +01:00
2 changed files with 13 additions and 16 deletions

View File

@@ -28,11 +28,11 @@ pub fn build_source_package(cwd: Option<&Path>) -> Result<(), Box<dyn Error>> {
// If a signing key is found, use it for signing
if let Some(key_id) = &signing_key {
args.push("-sa"); // Sign the source package
args.push("-k");
args.push(key_id);
log::info!("Using GPG key {} for signing", key_id);
} else {
args.push("--no-sign");
log::info!(
"No GPG key found for {} ({}), building without signing",
maintainer_name,

View File

@@ -103,7 +103,13 @@ fn find_dsc_file(
#[cfg(test)]
mod tests {
async fn test_build_end_to_end(package: &str, series: &str, arch: Option<&str>, cross: bool) {
async fn test_build_end_to_end(
package: &str,
series: &str,
dist: Option<&str>,
arch: Option<&str>,
cross: bool,
) {
log::info!(
"Starting end-to-end test for package: {} (series: {}, arch: {:?}, cross: {})",
package,
@@ -117,18 +123,9 @@ mod tests {
log::debug!("Created temporary directory: {}", cwd.display());
log::info!("Pulling package {} from Ubuntu {}...", package, series);
crate::pull::pull(
package,
"",
Some(series),
"",
"",
Some("ubuntu"),
Some(cwd),
None,
)
.await
.expect("Cannot pull package");
crate::pull::pull(package, "", Some(series), "", "", dist, Some(cwd), None)
.await
.expect("Cannot pull package");
log::info!("Successfully pulled package {}", package);
// Change directory to the package directory
@@ -162,12 +159,12 @@ mod tests {
#[tokio::test]
async fn test_deb_hello_ubuntu_end_to_end() {
test_build_end_to_end("hello", "noble", None, false).await;
test_build_end_to_end("hello", "noble", None, None, false).await;
}
#[tokio::test]
#[cfg(target_arch = "x86_64")]
async fn test_deb_hello_ubuntu_cross_end_to_end() {
test_build_end_to_end("hello", "noble", Some("riscv64"), true).await;
test_build_end_to_end("hello", "noble", None, Some("riscv64"), true).await;
}
}