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: mirgate fix* and future_incompat_report to snapbox #14173

Merged
merged 3 commits into from
Jul 2, 2024

Conversation

eth3lbert
Copy link
Contributor

What does this PR try to resolve?

Part of #14039.

Migrate following to snapbox:

  • tests/testsuite/fix.rs
  • tests/testsuite/fix_n_times.rs
  • tests/testsuite/future_incompat_report.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
.with_status(101)
.run();
p.cargo("fix").cwd("src").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.

.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

@@ -262,6 +314,7 @@ fn test_multi_crate() {
assert_eq!(lines.next(), None);
}

#[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_stdout_does_not_contain is being used in this function.

Comment on lines 903 to 907
p.cargo("fix --edition --allow-no-vcs")
.with_stderr_contains("[CHECKING] foo [..]")
.with_stderr_contains(&format!(
"\
[WARNING] `src/lib.rs` is already on the latest edition ({latest_stable}), unable to migrate further
",
latest_stable = latest_stable
))
.with_stderr_data(str![])
.run();
Copy link
Contributor Author

@eth3lbert eth3lbert Jun 30, 2024

Choose a reason for hiding this comment

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

I'm not sure why this isn't being overwritten. Is this fix even running?

Copy link
Member

Choose a reason for hiding this comment

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

No. I think we can add deprecated and leave off for now.

edition = '{}'
"#,
latest_stable
),
)

.with_stderr_data(str![[r#"
...
[FIXED] src/lib.rs ([..] fixes)
...
"#]])
.with_stderr_data(
Copy link
Member

Choose a reason for hiding this comment

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

Why do you need two separate assertions?

Also mind the plurality. Maybe ([..] fix[..])?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, I forgot to mention this! It sometimes generate two entries:

   1    1 | [COMPILING] foo v0.0.1 ([ROOT]/foo)
   2    2 | [FIXED] build.rs (1 fix)
   3    3 | [FIXED] src/main.rs (1 fix)
   4    4 | [FIXED] examples/foo.rs (1 fix)
   5    5 | [FIXED] tests/a.rs (1 fix)
   6    6 | [FIXED] src/lib.rs ([..]fix[..])
   7    7 | [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
        8 + [FIXED] src/lib.rs (1 fix)

Do you prefer something looks more like this?

        .with_stderr_data(
            str![[r#"
[COMPILING] foo v0.0.1 ([ROOT]/foo)
[FIXED] build.rs (1 fix)
[FIXED] src/lib.rs ([..]fix[..])
[FIXED] src/main.rs (1 fix)
[FIXED] examples/foo.rs (1 fix)
[FIXED] tests/a.rs (1 fix)
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
...
"#]]

Copy link
Member

Choose a reason for hiding this comment

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

Yes. Based on the comment, I think that matches the behavior of the old assertion and is still valid today.

Comment on lines 903 to 907
p.cargo("fix --edition --allow-no-vcs")
.with_stderr_contains("[CHECKING] foo [..]")
.with_stderr_contains(&format!(
"\
[WARNING] `src/lib.rs` is already on the latest edition ({latest_stable}), unable to migrate further
",
latest_stable = latest_stable
))
.with_stderr_data(str![])
.run();
Copy link
Member

Choose a reason for hiding this comment

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

No. I think we can add deprecated and leave off for now.

edition = '{}'
"#,
latest_stable
),
)

@eth3lbert
Copy link
Contributor Author

Feedbacks addressed! Thanks for the review!

@weihanglo
Copy link
Member

Thanks!

@bors r+

@bors
Copy link
Contributor

bors commented Jul 2, 2024

📌 Commit ef27c27 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 2, 2024
bors added a commit that referenced this pull request Jul 2, 2024
test: mirgate fix* and future_incompat_report to snapbox

### What does this PR try to resolve?

Part of #14039.

Migrate following to snapbox:

- `tests/testsuite/fix.rs`
- `tests/testsuite/fix_n_times.rs`
- `tests/testsuite/future_incompat_report.rs`
@bors
Copy link
Contributor

bors commented Jul 2, 2024

⌛ Testing commit ef27c27 with merge 67bcb36...

@bors
Copy link
Contributor

bors commented Jul 2, 2024

💔 Test failed - checks-actions

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

This is a new one.

---- doc::doc_workspace_open_binary_and_library stdout ----
running `D:\a\cargo\cargo\target\debug\cargo.exe doc --open`
thread 'doc::doc_workspace_open_binary_and_library' panicked at tests\testsuite\doc.rs:1608:10:

test failed running `D:\a\cargo\cargo\target\debug\cargo.exe doc --open`
error: process exited with code 101 (expected 0)
--- stdout

--- stderr
 Documenting foo v0.1.0 (D:\a\cargo\cargo\target\tmp\cit\t1308\foo\foo)
    Checking foo v0.1.0 (D:\a\cargo\cargo\target\tmp\cit\t1308\foo\foo)

thread 'main' has overflowed its stack
error: could not document `foo`

Caused by:
  process didn't exit successfully: `rustdoc --edition=2015 --crate-type lib --crate-name foolib foo\src\lib.rs -o D:\a\cargo\cargo\target\tmp\cit\t1308\foo\target\doc --check-cfg cfg(docsrs) --check-cfg "cfg(feature, values())" --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat -C metadata=4cabb6f925159d16 -L dependency=D:\a\cargo\cargo\target\tmp\cit\t1308\foo\target\debug\deps --crate-version 0.1.0` (exit code: 0xc00000fd, STATUS_STACK_OVERFLOW)

Let us retry

@bors retry

@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 2, 2024
@bors
Copy link
Contributor

bors commented Jul 2, 2024

⌛ Testing commit ef27c27 with merge bff8a08...

@bors
Copy link
Contributor

bors commented Jul 2, 2024

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

@bors bors merged commit bff8a08 into rust-lang:master Jul 2, 2024
22 checks passed
@eth3lbert eth3lbert deleted the snapbox-f branch July 2, 2024 20:31
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 3, 2024
Update cargo

23 commits in 4ed7bee47f7dd4416b36fada1909e9a62c546246..a515d463427b3912ec0365d106791f88c1c14e1b
2024-06-25 16:28:22 +0000 to 2024-07-02 20:53:36 +0000
- test: migrate rust_version and rustc* to snapbox (rust-lang/cargo#14177)
- test: mirgate fix* and future_incompat_report to snapbox (rust-lang/cargo#14173)
- test:migrate `edition/error` to snapbox (rust-lang/cargo#14175)
- chore(deps): update compatible (rust-lang/cargo#14174)
- refactor(source): Clean up after PathSource/RecursivePathSource split (rust-lang/cargo#14169)
- test: Migrate some files to snapbox (rust-lang/cargo#14132)
- test:  fix several assertions (rust-lang/cargo#14167)
- test: replace glob with explicit unordered calls (rust-lang/cargo#14166)
- Make it clear that `CARGO_CFG_TARGET_FAMILY` is multi-valued (rust-lang/cargo#14165)
- Document `CARGO_CFG_TARGET_ABI` (rust-lang/cargo#14164)
- test: Migrate git to snapbox (rust-lang/cargo#14159)
- test: migrate some files to snapbox (rust-lang/cargo#14158)
- test: migrate registry and registry_auth to snapbox (rust-lang/cargo#14149)
- gix: remove `revision` feature from cargo (rust-lang/cargo#14160)
- test: migrate package* and publish* to snapbox (rust-lang/cargo#14130)
- More `update --breaking` tests (rust-lang/cargo#14049)
- test: migrate clean to snapbox (rust-lang/cargo#14096)
- Allow `unexpected_builtin_cfgs` lint in `user_specific_cfgs` test (rust-lang/cargo#14153)
- test: migrate search, source_replacement and standard_lib to snapbox (rust-lang/cargo#14151)
- Docs: Update config summary to include missing keys. (rust-lang/cargo#14145)
- test: migrate `dep_info/diagnostics/direct_minimal_versions` to snapbox (rust-lang/cargo#14143)
- Docs: Remove duplicate `strip` section. (rust-lang/cargo#14146)
- Docs: Fix curly quotes in config docs. (rust-lang/cargo#14144)
@rustbot rustbot added this to the 1.81.0 milestone Jul 3, 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