test: migrate testsuites to snapbox#14091
Merged
bors merged 5 commits intorust-lang:masterfrom Jun 20, 2024
Merged
Conversation
Collaborator
Contributor
Author
|
r? @weihanglo |
ef8e59e to
20768f7
Compare
0xPoe
reviewed
Jun 18, 2024
| .with_status(101) | ||
| .with_stdout_contains("[..]\\u001b[38;5;9merror[..]") | ||
| .with_stdout_data(str![[r#" | ||
| {"reason":"compiler-message","package_id":"path+[ROOTURL]/foo#0.1.0","manifest_path":"[..]","target":{"kind":["bin"],"crate_types":["bin"],"name":"foo","src_path":"[..]","edition":"2015","doc":true,"doctest":false,"test":true},"message":{"$message_type":"diagnostic","message":"`main` function not found in crate `foo`","code":{"code":"E0601","explanation":"No `main` function was found in a binary crate./n/nTo fix this error, add a `main` function:/n/n```/nfn main() {/n // Your program will start here./n println!(/"Hello world!/");/n}/n```/n/nIf you don't know the basics of Rust, you can look at the/n[Rust Book][rust-book] to get started./n/n[rust-book]: https://doc.rust-lang.org/book//n"},"level":"error","spans":[{"file_name":"src/main.rs","byte_start":0,"byte_end":0,"line_start":0,"line_end":0,"column_start":1,"column_end":1,"is_primary":true,"text":[],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"consider adding a `main` function to `src/main.rs`","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"/u001b[0m/u001b[1m/u001b[38;5;9merror[E0601]/u001b[0m/u001b[0m/u001b[1m: `main` function not found in crate `foo`/u001b[0m/n/u001b[0m /u001b[0m/u001b[0m/u001b[1m/u001b[38;5;12m|/u001b[0m/n/u001b[0m /u001b[0m/u001b[0m/u001b[1m/u001b[38;5;12m= /u001b[0m/u001b[0m/u001b[1mnote/u001b[0m/u001b[0m: consider adding a `main` function to `src/main.rs`/u001b[0m/n/n"}} |
Member
There was a problem hiding this comment.
I guess we only need to check \\u001b[38;5;9merror here?
ac227e0 to
ba19274
Compare
weihanglo
reviewed
Jun 18, 2024
Comment on lines
-60
to
-61
| let outer_manifest = r#"{"root": "[ROOT]/foo/Cargo.toml"}"#; | ||
| let inner_manifest = r#"{"root": "[ROOT]/foo/inner/Cargo.toml"}"#; |
Member
There was a problem hiding this comment.
Guess it's also possible to do something alike? By extracting them as variables, we can make sure invocations that are ought to be the same still get the same JSON.
Suggested change
| let outer_manifest = r#"{"root": "[ROOT]/foo/Cargo.toml"}"#; | |
| let inner_manifest = r#"{"root": "[ROOT]/foo/inner/Cargo.toml"}"#; | |
| let outer_manifest = str![[r#"{"root": "[ROOT]/foo/Cargo.toml"}"#]]; | |
| let inner_manifest = str![[r#"{"root": "[ROOT]/foo/inner/Cargo.toml"}"#]]; |
Contributor
There was a problem hiding this comment.
It appears the suggested change might have a typo
let inner_manifest = str![[r#"{"root": "[ROOT]/foo/inner/Cargo.toml"}"#]];
henry40408
added a commit
to henry40408/cargo
that referenced
this pull request
Jun 19, 2024
weihanglo
reviewed
Jun 19, 2024
Member
weihanglo
left a comment
There was a problem hiding this comment.
Thanks. Just one thing left and we're ready to go.
Contributor
Author
|
I'll tidy up commits after CI passes. |
This reverts commit 2fbba53.
Contributor
Author
|
@weihanglo I've finished arranging the commits. |
weihanglo
approved these changes
Jun 20, 2024
Member
|
Thanks! @bors r+ |
Contributor
Contributor
Contributor
|
☀️ Test successful - checks-actions |
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jun 22, 2024
Update cargo 17 commits in 3ed207e416fb2f678a40cc79c02dcf4f936a21ce..bc89bffa5987d4af8f71011c7557119b39e44a65 2024-06-18 19:18:22 +0000 to 2024-06-22 00:36:36 +0000 - test: migrate weak_dep_features, workspaces and yank to snapbox (rust-lang/cargo#14111) - test: migrate features and features(2|_namespaced) to snapbox (rust-lang/cargo#14100) - test: Add auto-redaction for not found error (rust-lang/cargo#14124) - test: migrate build to snapbox (rust-lang/cargo#14068) - test: migrate unit_graph, update and vendor to snapbox (rust-lang/cargo#14119) - fix(test): Un-redact Packaged files (rust-lang/cargo#14123) - test: Auto-redact file number (rust-lang/cargo#14121) - test: migrate lints_table and lints/(mod|unknown_lints) to snapbox (rust-lang/cargo#14104) - Simplify checking feature syntax (rust-lang/cargo#14106) - test: migrate testsuites to snapbox (rust-lang/cargo#14091) - Make `-Cmetadata` consistent across platforms (rust-lang/cargo#14107) - fix(toml): Warn when edition is unuset, even when MSRV is unset (rust-lang/cargo#14110) - Add `CodeFix::apply_solution` and impl `Clone` (rust-lang/cargo#14092) - test: migrate `cargo_alias_config&cargo_config/mod` to snapbox (rust-lang/cargo#14093) - Simplify checking for dependency cycles (rust-lang/cargo#14089) - test: Migrate `pub_priv.rs` to snapshot (rust-lang/cargo#14103) - test: migrate rustdoc and rustdocflags to snapbox (rust-lang/cargo#14098) <!-- r? ghost -->
github-actions Bot
pushed a commit
to rust-lang/miri
that referenced
this pull request
Jun 23, 2024
Update cargo 17 commits in 3ed207e416fb2f678a40cc79c02dcf4f936a21ce..bc89bffa5987d4af8f71011c7557119b39e44a65 2024-06-18 19:18:22 +0000 to 2024-06-22 00:36:36 +0000 - test: migrate weak_dep_features, workspaces and yank to snapbox (rust-lang/cargo#14111) - test: migrate features and features(2|_namespaced) to snapbox (rust-lang/cargo#14100) - test: Add auto-redaction for not found error (rust-lang/cargo#14124) - test: migrate build to snapbox (rust-lang/cargo#14068) - test: migrate unit_graph, update and vendor to snapbox (rust-lang/cargo#14119) - fix(test): Un-redact Packaged files (rust-lang/cargo#14123) - test: Auto-redact file number (rust-lang/cargo#14121) - test: migrate lints_table and lints/(mod|unknown_lints) to snapbox (rust-lang/cargo#14104) - Simplify checking feature syntax (rust-lang/cargo#14106) - test: migrate testsuites to snapbox (rust-lang/cargo#14091) - Make `-Cmetadata` consistent across platforms (rust-lang/cargo#14107) - fix(toml): Warn when edition is unuset, even when MSRV is unset (rust-lang/cargo#14110) - Add `CodeFix::apply_solution` and impl `Clone` (rust-lang/cargo#14092) - test: migrate `cargo_alias_config&cargo_config/mod` to snapbox (rust-lang/cargo#14093) - Simplify checking for dependency cycles (rust-lang/cargo#14089) - test: Migrate `pub_priv.rs` to snapshot (rust-lang/cargo#14103) - test: migrate rustdoc and rustdocflags to snapbox (rust-lang/cargo#14098) <!-- r? ghost -->
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR try to resolve?
Part of #14039.
Migrate the following testsuites to snapbox:
tests/testsuite/locate_project.rssee test: migrate testsuites to snapbox #14091 (comment)How should we test and review this PR?
N/A
Additional information
N/A