deb: test refactoring
Some checks failed
CI / build (push) Failing after 7m18s

This commit is contained in:
2026-01-08 19:14:26 +01:00
parent a6df6070d4
commit e2838bf5aa

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;
}
}