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

test: migrate install* and inheritable_workspace_fields to snapbox #14170

Merged
merged 3 commits into from
Jul 4, 2024

Conversation

eth3lbert
Copy link
Contributor

What does this PR try to resolve?

Part of #14039.

Migrate following to snapbox:

  • tests/testsuite/inheritable_workspace_fields.rs
  • tests/testsuite/install.rs
  • tests/testsuite/install_upgrade.rs

@rustbot
Copy link
Collaborator

rustbot commented Jun 30, 2024

r? @weihanglo

rustbot has assigned @weihanglo.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 30, 2024
@eth3lbert eth3lbert force-pushed the snapbox-i branch 4 times, most recently from c27d3f9 to a6a587f Compare June 30, 2024 07:22
@@ -1429,6 +1385,7 @@ fn use_path_workspace() {
assert_eq!(lock, lock2, "different lockfiles");
}

#[allow(deprecated)]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

with_stderr_does_not_contain is being used in this function.

// Particularly avoid "Installed package `ws-root v0.1.0 ([..]])` (executable `ws-member`)":
.with_stderr_does_not_contain("ws-member")
.run();
}

#[allow(deprecated)]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

with_stderr_does_not_contain is being used in this function.

.run();
}

#[allow(deprecated)]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

with_stderr_does_not_contain is being used in this function.

Comment on lines +2091 to +2160
.with_stderr_data(str![[r#"
[UPDATING] git repository `[ROOTURL]/foo`
[ERROR] invalid type: integer `3`, expected a boolean
--> home/.cargo/git/checkouts/foo-[HASH]/[..]/Cargo.toml:6:27
|
6 | incremental = 3
| ^
|
[ERROR] invalid type: integer `3`, expected a boolean
--> home/.cargo/git/checkouts/foo-[HASH]/[..]/Cargo.toml:6:27
|
6 | incremental = 3
| ^
|

"#]])
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure if the duplicated error message shown here is correct. Therefore, I'm currently avoiding redacting with glob intentionally.

Copy link
Member

Choose a reason for hiding this comment

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

CI passes so yeah keep it.

.with_stderr(
"\
[UPDATING] `[..]` index
.with_stderr_data(str![[r#"
Copy link
Member

Choose a reason for hiding this comment

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

Could we allow deprecated for all --message-format=json tests?
The snapshot is hard to read and review so we don't want to do it now.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Absolutely! That makes things a lot easier, to be honest. 😅

.with_stderr_contains("[INSTALLING] bar v0.0.1")
.with_stderr_contains("[..]--target nonexistent[..]")
.with_stderr_data(str![[r#"
...
Copy link
Member

Choose a reason for hiding this comment

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

[INSTALLING] bar v0.0.1 is missing, though I think that is fine.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll double-check this and re-add it.

Comment on lines +2091 to +2160
.with_stderr_data(str![[r#"
[UPDATING] git repository `[ROOTURL]/foo`
[ERROR] invalid type: integer `3`, expected a boolean
--> home/.cargo/git/checkouts/foo-[HASH]/[..]/Cargo.toml:6:27
|
6 | incremental = 3
| ^
|
[ERROR] invalid type: integer `3`, expected a boolean
--> home/.cargo/git/checkouts/foo-[HASH]/[..]/Cargo.toml:6:27
|
6 | incremental = 3
| ^
|

"#]])
Copy link
Member

Choose a reason for hiding this comment

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

CI passes so yeah keep it.

@eth3lbert
Copy link
Contributor Author

Feedback addressed! Thanks!

@weihanglo
Copy link
Member

Thanks!

@bors r+

@bors
Copy link
Collaborator

bors commented Jul 4, 2024

📌 Commit 43ad0ac has been approved by weihanglo

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 4, 2024
@bors
Copy link
Collaborator

bors commented Jul 4, 2024

⌛ Testing commit 43ad0ac with merge 1e49698...

@bors
Copy link
Collaborator

bors commented Jul 4, 2024

☀️ Test successful - checks-actions
Approved by: weihanglo
Pushing 1e49698 to master...

@bors bors merged commit 1e49698 into rust-lang:master Jul 4, 2024
22 checks passed
@eth3lbert eth3lbert deleted the snapbox-i branch July 4, 2024 21:38
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 5, 2024
Update cargo

13 commits in a515d463427b3912ec0365d106791f88c1c14e1b..f86ce56396168edf5d0e1c412ddda0b2edba7d46
2024-07-02 20:53:36 +0000 to 2024-07-05 17:52:05 +0000
- test: Migrate jobserver to snapbox (rust-lang/cargo#14191)
- chore(deps): update msrv (3 versions) to v1.77 (rust-lang/cargo#14186)
- test: migrate build_plan and build_script to snapbox (rust-lang/cargo#14193)
- test: migrate cfg and check to snapbox (rust-lang/cargo#14185)
- test: migrate install* and inheritable_workspace_fields to snapbox (rust-lang/cargo#14170)
- Pass rustflags to artifacts built with implicit targets when using target-applies-to-host (rust-lang/cargo#13900)
- test: Migrate network tests to snapbox (rust-lang/cargo#14187)
- test: migrate some files to snapbox (rust-lang/cargo#14113)
- test: Auto-redact `... after last build at ...`; Migrate `freshness` to Snapbox (rust-lang/cargo#14161)
- chore: fix some typos (rust-lang/cargo#14182)
- fix: improve message for inactive weak optional feature with edition2024 through unused dep collection (rust-lang/cargo#14026)
- test:migrate `doc/directory/docscrape` to snapbox (rust-lang/cargo#14171)
- test: Migrate git_auth to snapbox (rust-lang/cargo#14172)
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 7, 2024
Update cargo

20 commits in a515d463427b3912ec0365d106791f88c1c14e1b..154fdac39ae9629954e19e9986fd2cf2cdd8d964
2024-07-02 20:53:36 +0000 to 2024-07-07 01:28:23 +0000
- test: relax redactions for rust-lang/rust (rust-lang/cargo#14203)
- use "bootstrap" instead of "rustbuild" (rust-lang/cargo#14207)
- test: migrate serveral files to snapbox (rust-lang/cargo#14180)
- Add rustdocflags to Unit's Debug impl (rust-lang/cargo#14201)
- Allow enabling `config-include` feature in config (rust-lang/cargo#14196)
- fix(test): Restore `does_not_contain` for check (rust-lang/cargo#14198)
- test: migrate patch, pkgid, proc_macro and progress to snapbox (rust-lang/cargo#14181)
- test: Migrate jobserver to snapbox (rust-lang/cargo#14191)
- chore(deps): update msrv (3 versions) to v1.77 (rust-lang/cargo#14186)
- test: migrate build_plan and build_script to snapbox (rust-lang/cargo#14193)
- test: migrate cfg and check to snapbox (rust-lang/cargo#14185)
- test: migrate install* and inheritable_workspace_fields to snapbox (rust-lang/cargo#14170)
- Pass rustflags to artifacts built with implicit targets when using target-applies-to-host (rust-lang/cargo#13900)
- test: Migrate network tests to snapbox (rust-lang/cargo#14187)
- test: migrate some files to snapbox (rust-lang/cargo#14113)
- test: Auto-redact `... after last build at ...`; Migrate `freshness` to Snapbox (rust-lang/cargo#14161)
- chore: fix some typos (rust-lang/cargo#14182)
- fix: improve message for inactive weak optional feature with edition2024 through unused dep collection (rust-lang/cargo#14026)
- test:migrate `doc/directory/docscrape` to snapbox (rust-lang/cargo#14171)
- test: Migrate git_auth to snapbox (rust-lang/cargo#14172)
@rustbot rustbot added this to the 1.81.0 milestone Jul 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants