-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
tests: ignore check_that_clippy_has_the_same_major_version_as_rustc()inside the rustc repo #6684
Conversation
… 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
r? @flip1995 (rust-highfive has picked a reviewer for you, use r? to override) |
@@ -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() { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
@bors r+ Thanks! |
📌 Commit 93daf27 has been approved by |
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
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:
rust-clippy/tests/dogfood.rs
Line 16 in a507c27
changelog: None