Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

specify path to the spec files #118

Merged
merged 3 commits into from
Sep 25, 2023
Merged

specify path to the spec files #118

merged 3 commits into from
Sep 25, 2023

Conversation

toidiu
Copy link
Contributor

@toidiu toidiu commented Sep 21, 2023

aws/s2n-tls#4219

Description of changes:
Duvet was originally designed so that the spec files would be stored at project root. Since, ends up cluttering the codebase, some projects such as s2n-tls instead store all spec related material in a separate directory. This results in unexpected behavior where the report command is unable to find the spec files and attempts to re-download them each time.

This PR expose a new argument --spec-download-path which can be used to specify the location where to download the spec files. Specifically for s2n-tls you could add --spec-download-path 'compliance' to the generate script.

Callout

I only exposed the spec-download-path for the report sub-command and not extract since it possible to run extract from any directory. We can always add this param if we want later on.

Testing

I tested this locally to confirm that this works with the directory structure in s2n-tls.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@toidiu toidiu marked this pull request as ready for review September 22, 2023 22:16
@toidiu toidiu requested a review from a team as a code owner September 22, 2023 22:16
src/project.rs Outdated Show resolved Hide resolved
src/extract.rs Outdated Show resolved Hide resolved
src/target.rs Outdated
@@ -72,10 +72,10 @@ impl TargetPath {
Ok(Self::Path(path))
}

pub fn load(&self) -> Result<String, Error> {
pub fn load(&self, spec_download_path: Option<&String>) -> Result<String, Error> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
pub fn load(&self, spec_download_path: Option<&String>) -> Result<String, Error> {
pub fn load(&self, spec_path: Option<&str>) -> Result<String, Error> {

src/target.rs Outdated Show resolved Hide resolved
src/target.rs Outdated Show resolved Hide resolved
@camshaft camshaft merged commit ce9325e into awslabs:main Sep 25, 2023
12 of 13 checks passed
@toidiu toidiu deleted the ak-spec_path branch September 25, 2023 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants