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

Cleanup tests #11745

Merged
merged 5 commits into from
Feb 21, 2023
Merged

Cleanup tests #11745

merged 5 commits into from
Feb 21, 2023

Conversation

Muscraft
Copy link
Member

When working on #11738 I noticed a few tests that needed to be cleaned up. It was suggested to split the test changes into their own PR.

  • bad_config::bad1
    • This was trying to match config which would get matched in the wrong place due to the test name having config in it
    • Fixed by making the match /config
  • build_script::panic_abort_with_build_scripts
    • This test was failing as it was making sure panic was not in the output. After this change, it could match the test name and fail.
    • To fix this I updated it to look at panic=abort which appears to be what it was originally looking for (Partially revert dep changes in #5651 #5711). @ehuss please let me know if I misread what the test was testing.
  • cargo_command::cargo_subcommand_args
    • This test had #[test] above #[cargo_test] which caused it to throw an error removing it fixed the issue

During this time I also ran into issues with cargo_remove tests being named fn case() which is different from how tests are normally named. I talked with @epage and it was decided that fn case() should probably be used for all snapbox tests since the unique test name is already the folder name. I went ahead and renamed all tests within cargo_add/ and init/ to match this style.

This PR should be reviewed commit by commit.

@rustbot
Copy link
Collaborator

rustbot commented Feb 20, 2023

r? @ehuss

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added A-documenting-cargo-itself Area: Cargo's documentation S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 20, 2023
@epage
Copy link
Contributor

epage commented Feb 20, 2023

During this time I also ran into issues with cargo_remove tests being named fn case() which is different from how tests are normally named. I talked with @epage and it was decided that fn case() should probably be used for all snapbox tests since the unique test name is already the folder name. I went ahead and renamed all tests within cargo_add/ and init/ to match this style.

The motivation is that this makes it easy to start up a new test, just copy/paste.

@epage
Copy link
Contributor

epage commented Feb 21, 2023

@bors r+

@bors
Copy link
Contributor

bors commented Feb 21, 2023

📌 Commit 822b257 has been approved by epage

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 Feb 21, 2023
@bors
Copy link
Contributor

bors commented Feb 21, 2023

⌛ Testing commit 822b257 with merge d1d16f2...

@bors
Copy link
Contributor

bors commented Feb 21, 2023

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

@bors bors merged commit d1d16f2 into rust-lang:master Feb 21, 2023
@Muscraft Muscraft deleted the cleanup-tests branch February 21, 2023 02:33
weihanglo added a commit to weihanglo/rust that referenced this pull request Feb 23, 2023
15 commits in 17b3d0de0897e1c6b8ca347bd39f850bb0a5b9f6..9d5b32f503fc099c4064298465add14d4bce11e6
2023-02-17 19:45:09 +0000 to 2023-02-22 23:04:16 +0000

- refactor(job_queue): docs and move types around (rust-lang/cargo#11758)
- Scrub more of the test environment (rust-lang/cargo#11757)
- Make more reads of environment variables go through the `Config` (rust-lang/cargo#11754)
- Revert "Update curl-sys to use libcurl 7.88.1" (rust-lang/cargo#11755)
- use consistent case (rust-lang/cargo#11748)
- Switch some tests from `build` to `check` (rust-lang/cargo#11725)
- Fix typo in sparse-registry warning message (rust-lang/cargo#11753)
- reuse url encoding from `url` crate, don't use separate `percent-encoding` (rust-lang/cargo#11750)
- Read environment variables through `Config` instead of `std::env::var(_os)` (rust-lang/cargo#11727)
- Update curl-sys to use libcurl 7.88.1 (rust-lang/cargo#11749)
- mdman: update pretty_assertions to reduce deps (rust-lang/cargo#11747)
- Cleanup tests (rust-lang/cargo#11745)
- Enhance help texts of position args (rust-lang/cargo#11740)
- Fix typo (rust-lang/cargo#11741)
- Update comment about cargo-ok (rust-lang/cargo#11724)
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 23, 2023
Update cargo

15 commits in 17b3d0de0897e1c6b8ca347bd39f850bb0a5b9f6..9d5b32f503fc099c4064298465add14d4bce11e6
2023-02-17 19:45:09 +0000 to 2023-02-22 23:04:16 +0000

- refactor(job_queue): docs and move types around (rust-lang/cargo#11758)
- Scrub more of the test environment (rust-lang/cargo#11757)
- Make more reads of environment variables go through the `Config` (rust-lang/cargo#11754)
- Revert "Update curl-sys to use libcurl 7.88.1" (rust-lang/cargo#11755)
- use consistent case (rust-lang/cargo#11748)
- Switch some tests from `build` to `check` (rust-lang/cargo#11725)
- Fix typo in sparse-registry warning message (rust-lang/cargo#11753)
- reuse url encoding from `url` crate, don't use separate `percent-encoding` (rust-lang/cargo#11750)
- Read environment variables through `Config` instead of `std::env::var(_os)` (rust-lang/cargo#11727)
- Update curl-sys to use libcurl 7.88.1 (rust-lang/cargo#11749)
- mdman: update pretty_assertions to reduce deps (rust-lang/cargo#11747)
- Cleanup tests (rust-lang/cargo#11745)
- Enhance help texts of position args (rust-lang/cargo#11740)
- Fix typo (rust-lang/cargo#11741)
- Update comment about cargo-ok (rust-lang/cargo#11724)
@ehuss ehuss added this to the 1.69.0 milestone Mar 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-documenting-cargo-itself Area: Cargo's documentation 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.

5 participants