Compare commits
2 Commits
6fb4ccfa88
...
e2838bf5aa
| Author | SHA1 | Date | |
|---|---|---|---|
| e2838bf5aa | |||
| a6df6070d4 |
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user