From 9524cae5efc0e258bcffb9a62717e1a0e1232e4e Mon Sep 17 00:00:00 2001 From: Valentin Haudiquet Date: Sun, 11 Jan 2026 01:14:43 +0100 Subject: [PATCH] ci-test: make deb tests sequential --- Cargo.toml | 2 +- src/deb/mod.rs | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 13c6044..f77f2d8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -27,8 +27,8 @@ xz2 = "0.1" serde_json = "1.0.145" directories = "6.0.0" ssh2 = "0.9.5" -tempfile = "3.10.1" gpgme = "0.11" [dev-dependencies] test-log = "0.2.19" +serial_test = "3.3.1" diff --git a/src/deb/mod.rs b/src/deb/mod.rs index 9659a9c..aed63d5 100644 --- a/src/deb/mod.rs +++ b/src/deb/mod.rs @@ -105,6 +105,7 @@ fn find_dsc_file( #[cfg(test)] mod tests { + use serial_test::serial; async fn test_build_end_to_end( package: &str, series: &str, @@ -159,8 +160,16 @@ mod tests { ); } + // Tests below will be marked 'serial' + // As builds are using ephemeral contexts, tests running on the same + // process could use the ephemeral context of another thread and + // interfere with each other. + // FIXME: This is not ideal. In the future, we might want to + // either explicitely pass context (instead of shared state) or + // fork for building? #[tokio::test] #[test_log::test] + #[serial] async fn test_deb_hello_ubuntu_end_to_end() { test_build_end_to_end("hello", "noble", None, None, false).await; } @@ -168,6 +177,7 @@ mod tests { #[tokio::test] #[test_log::test] #[cfg(target_arch = "x86_64")] + #[serial] async fn test_deb_hello_ubuntu_cross_end_to_end() { test_build_end_to_end("hello", "noble", None, Some("riscv64"), true).await; }