Skip to content

tests: ignore check_that_clippy_has_the_same_major_version_as_rustc()inside the rustc repo #6684

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

Merged

Conversation

matthiaskrgr
Copy link
Member

Do not check if clippy version matches rustc version when runnning tests inside the rustc repo.
This makes sure that upstream rustc maintainers do not have to deal with our test failing/mismatching versions
when the rustc version bump is happening.
cc #6683

We already do the "don't run inside the rustc-repo" workaround for the dogfood test:

if cargo::is_rustc_test_suite() {

changelog: None

… inside the rustc repo.

Do not check if clippy version matches rustc version when runnning tests inside the rustc repo.
This makes sure that upstream rustc maintainers do not have to deal with our test failing/mismatching versions
when the rustc version bump is happening.
cc rust-lang#6683
@rust-highfive
Copy link

r? @flip1995

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Feb 6, 2021
@@ -23,6 +23,12 @@ fn check_that_clippy_lints_has_the_same_version_as_clippy() {

#[test]
fn check_that_clippy_has_the_same_major_version_as_rustc() {
// do not run this test inside the upstream rustc repo:
// https://github.com/rust-lang/rust-clippy/issues/6683
if option_env!("RUSTC_TEST_SUITE").is_some() {
Copy link
Member

Choose a reason for hiding this comment

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

Couldn't you just use cargo::is_rustc_test_suite() here? If not, just r=me.

Copy link
Member Author

@matthiaskrgr matthiaskrgr Feb 6, 2021

Choose a reason for hiding this comment

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

If I use mod cargo; to make the function available in versioncheck.rs, this would need #![feature(once_cell)] inside versioncheck.rs and causes a couple of unused warnings for CARGO_TARGET_DIR and TARGET_LIB which the test does not need.

Simply copying the function body was the most straightforward way that I saw.

@flip1995
Copy link
Member

flip1995 commented Feb 6, 2021

@bors r+

Thanks!

@bors
Copy link
Contributor

bors commented Feb 6, 2021

📌 Commit 93daf27 has been approved by flip1995

@bors
Copy link
Contributor

bors commented Feb 6, 2021

⌛ Testing commit 93daf27 with merge dfb34c0...

@bors
Copy link
Contributor

bors commented Feb 6, 2021

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: flip1995
Pushing dfb34c0 to master...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants