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 a signing key is found, use it for signing
if let Some(key_id) = &signing_key { if let Some(key_id) = &signing_key {
args.push("-sa"); // Sign the source package
args.push("-k"); args.push("-k");
args.push(key_id); args.push(key_id);
log::info!("Using GPG key {} for signing", key_id); log::info!("Using GPG key {} for signing", key_id);
} else { } else {
args.push("--no-sign");
log::info!( log::info!(
"No GPG key found for {} ({}), building without signing", "No GPG key found for {} ({}), building without signing",
maintainer_name, maintainer_name,

View File

@@ -103,7 +103,13 @@ fn find_dsc_file(
#[cfg(test)] #[cfg(test)]
mod tests { 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!( log::info!(
"Starting end-to-end test for package: {} (series: {}, arch: {:?}, cross: {})", "Starting end-to-end test for package: {} (series: {}, arch: {:?}, cross: {})",
package, package,
@@ -117,16 +123,7 @@ mod tests {
log::debug!("Created temporary directory: {}", cwd.display()); log::debug!("Created temporary directory: {}", cwd.display());
log::info!("Pulling package {} from Ubuntu {}...", package, series); log::info!("Pulling package {} from Ubuntu {}...", package, series);
crate::pull::pull( crate::pull::pull(package, "", Some(series), "", "", dist, Some(cwd), None)
package,
"",
Some(series),
"",
"",
Some("ubuntu"),
Some(cwd),
None,
)
.await .await
.expect("Cannot pull package"); .expect("Cannot pull package");
log::info!("Successfully pulled package {}", package); log::info!("Successfully pulled package {}", package);
@@ -162,12 +159,12 @@ mod tests {
#[tokio::test] #[tokio::test]
async fn test_deb_hello_ubuntu_end_to_end() { 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] #[tokio::test]
#[cfg(target_arch = "x86_64")] #[cfg(target_arch = "x86_64")]
async fn test_deb_hello_ubuntu_cross_end_to_end() { 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;
} }
} }