Skip to content

Move snapshot tests into testsuite#10638

Merged
bors merged 2 commits into
rust-lang:masterfrom
Muscraft:move-snapshot-tests
May 7, 2022
Merged

Move snapshot tests into testsuite#10638
bors merged 2 commits into
rust-lang:masterfrom
Muscraft:move-snapshot-tests

Conversation

@Muscraft

@Muscraft Muscraft commented May 7, 2022

Copy link
Copy Markdown
Member

This moves all tests from the snapshot folder into the testsuite folder as described by this comment. A macro was also added so there is no need to specify the path in a snapshot test just the file. This was done for ease of refactoring and ease of porting new tests to snapshot

close #10627

r? @epage

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 7, 2022
Comment thread tests/testsuite/main.rs Outdated
Comment on lines 135 to 141

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

  1. This might be good to have in cargo_test_support
  2. Thinking about the name, I think its a bit misleading. I think people will assume this will be the crate root or tests/ root.

Neither of these is worth holding this up and the naming issue, I don't have better ideas for. Still wanted to get this out there to seed thoughts

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Looks like I have to redo a commit either way so I can change it. Do you like test_path?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

That implies the path to the current file. What about test_dir? _root implies the parent of all dirs while _dir might not be so bad.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I changed it to curr_dir as it seemed to fit the best

@Muscraft Muscraft force-pushed the move-snapshot-tests branch from b5029e2 to 639f3bd Compare May 7, 2022 01:52
@epage

epage commented May 7, 2022

Copy link
Copy Markdown
Contributor

@bors r+

@bors

bors commented May 7, 2022

Copy link
Copy Markdown
Contributor

📌 Commit 639f3bd has been approved by epage

@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 May 7, 2022
@bors

bors commented May 7, 2022

Copy link
Copy Markdown
Contributor

⌛ Testing commit 639f3bd with merge 9c61a3d...

@bors

bors commented May 7, 2022

Copy link
Copy Markdown
Contributor

☀️ Test successful - checks-actions
Approved by: epage
Pushing 9c61a3d to master...

@bors bors merged commit 9c61a3d into rust-lang:master May 7, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request May 12, 2022
Update cargo

20 commits in a44758ac805600edbb6ba51e7e6fb81a6077c0cd..3f052d8eed98c6a24f8b332fb2e6e6249d12d8c1
2022-05-04 02:29:34 +0000 to 2022-05-12 15:19:04 +0000
- pre-stabilization documentation for workspace inheritance (rust-lang/cargo#10659)
- test: Make curr_dir work in/out of workspace (rust-lang/cargo#10658)
- Fix no_cross_doctests race condition. (rust-lang/cargo#10660)
- Fix typo (rust-lang/cargo#10657)
- feat(install): Support `foo@version` like cargo-add (rust-lang/cargo#10650)
- fix typos found by the `typos-cli` crate (rust-lang/cargo#10649)
- feat(yank): Support foo@version like cargo-add (rust-lang/cargo#10597)
- add `cargo-features` to unstable docs for workspace inheritance (rust-lang/cargo#10648)
- Use the traits added to the Rust 2021 Edition prelude (rust-lang/cargo#10646)
- Pass `--target` to `rustdoc` for `cargo test` if specified with host target. (rust-lang/cargo#10594)
- Fix use of .. in dep-info-basedir (rust-lang/cargo#10281)
- fix some typos (rust-lang/cargo#10639)
- Move snapshot tests into testsuite (rust-lang/cargo#10638)
- Improve support of condition compilation checking (rust-lang/cargo#10566)
- When documenting private items in a binary, ignore warnings about links to private items (rust-lang/cargo#10142)
- Extend pkgid syntax with ``@`` support (rust-lang/cargo#10582)
- move one `snapshot/add` test into `testsuite/cargo_add/` (rust-lang/cargo#10631)
- Add caveat for covering features (rust-lang/cargo#10605)
- Improve CARGO_ENCODED_RUSTFLAGS and CARGO_ENCODED_RUSTDOCFLAGS variables docs (rust-lang/cargo#10633)
- reorganize `snapshot` tests to better work in contexts that sort by extension (rust-lang/cargo#10629)
@ehuss ehuss added this to the 1.62.0 milestone May 20, 2022
@Muscraft Muscraft deleted the move-snapshot-tests branch May 27, 2022 01:15
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.

Hard to review snapshots because they are far from their intended code

5 participants