Skip to content

Commit

Permalink
Fix dcap-artifact-retrieval CI issues
Browse files Browse the repository at this point in the history
  • Loading branch information
raoulstrackx committed Sep 12, 2024
1 parent 97ee9b2 commit 6192cba
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
run: cargo +nightly test --verbose --locked -p async-usercalls --target x86_64-fortanix-unknown-sgx --no-run

- name: Nightly test -p dcap-artifact-retrieval --target x86_64-fortanix-unknown-sgx --no-default-features --no-run
run: cargo +nightly --verbose --locked -p dcap-artifact-retrieval --target x86_64-fortanix-unknown-sgx --no-default-features --no-run
run: cargo +nightly test --verbose --locked -p dcap-artifact-retrieval --target x86_64-fortanix-unknown-sgx --no-default-features --no-run

- name: Cargo test -p dcap-ql --features link
run: cargo test --verbose --locked -p dcap-ql --features link
Expand Down
7 changes: 5 additions & 2 deletions intel-sgx/dcap-artifact-retrieval/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/

#[cfg(not(target_env = "sgx"))]
use clap::clap_app;

use std::path::{Path, PathBuf};

use clap::clap_app;
use dcap_artifact_retrieval::{
AzureProvisioningClientBuilder, IntelProvisioningClientBuilder, ProvisioningClient, PcsVersion,
};
Expand Down Expand Up @@ -92,6 +94,7 @@ pub fn download_dcap_artifacts(
Ok(())
}

#[cfg(not(target_env = "sgx"))]
fn main() {
fn is_directory(directory_path: String) -> std::result::Result<(), String> {
let path = Path::new(&directory_path);
Expand All @@ -111,7 +114,7 @@ fn main() {
}
}

let matches = clap_app!(tool =>
let matches = clap::clap_app!(tool =>
(author: "Fortanix")
(about: "Fortanix ecdsa artifact retrieval tool for DCAP attestation")
(@arg ORIGIN: --("origin") +takes_value validator(|s| parse_origin(s.as_str()).map(|_| ())) "Location from where artifacts need to be fetched. Options are: \"intel\" and \"azure\". Note that Azure does not provide access to all artifacts. Intel will be contacted as a fallback (default: \"intel\")")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ impl<'inp> ProvisioningServiceApi<'inp> for PckCertApi {
}
}

#[cfg(test)]
#[cfg(all(test, feature = "reqwest"))]
mod tests {
use std::path::PathBuf;
use std::time::Duration;
Expand Down

0 comments on commit 6192cba

Please sign in to comment.