-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Include SBOM outputs in fingerprints #17216
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -94,6 +94,40 @@ fn simple() { | |
| ); | ||
| } | ||
|
|
||
| #[cargo_test] | ||
| fn enabling_sbom_invalidates_fingerprint() { | ||
| let p = project() | ||
| .file("Cargo.toml", &basic_bin_manifest("foo")) | ||
| .file("src/main.rs", r#"fn main() {}"#) | ||
| .build(); | ||
|
|
||
| p.cargo("build").run(); | ||
|
|
||
| let file = append_sbom_suffix(&p.bin("foo")); | ||
| assert!(!file.exists()); | ||
|
|
||
| p.cargo("build -Zsbom") | ||
| .env("CARGO_BUILD_SBOM", "true") | ||
| .masquerade_as_nightly_cargo(&["sbom"]) | ||
| .with_stderr_data(cargo_test_support::str![[r#" | ||
| [COMPILING] foo v0.5.0 ([ROOT]/foo) | ||
| [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s | ||
|
|
||
| "#]]) | ||
| .run(); | ||
|
|
||
| assert!(file.is_file()); | ||
|
|
||
| p.cargo("build -Zsbom") | ||
| .env("CARGO_BUILD_SBOM", "true") | ||
| .masquerade_as_nightly_cargo(&["sbom"]) | ||
| .with_stderr_data(cargo_test_support::str![[r#" | ||
| [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s | ||
|
|
||
| "#]]) | ||
| .run(); | ||
|
Comment on lines
+109
to
+128
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you add
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you again follow the C-TEST pattern? Feel free to rebase and clean up history
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, sorry — I’m still getting used to the C-TEST convention. bd1b857 |
||
| } | ||
|
|
||
| #[cargo_test] | ||
| fn with_multiple_crate_types() { | ||
| let p = project() | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, we normally follow the pattern C-TEST described in this doc. The basic idea is that your first commit becomes a reproduction of the buggy behavior, and your second commit contains the diff that shows the behavior change. With that we can make sure we are not fixing a non-existing issue. Mind tweaking your git commits a bit?
View changes since the review
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something like this? 9beeb7b