Skip to content

Commit dfb34c0

Browse files
committed
Auto merge of #6684 - matthiaskrgr:versiontest_dont_break_upstream, r=flip1995
tests: ignore check_that_clippy_has_the_same_major_version_as_rustc()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 #6683 We already do the "don't run inside the rustc-repo" workaround for the dogfood test: https://github.com/rust-lang/rust-clippy/blob/a507c27660d05f37307369d30bee9e82ce3a11e1/tests/dogfood.rs#L16 changelog: None
2 parents a507c27 + 93daf27 commit dfb34c0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/versioncheck.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@ fn check_that_clippy_lints_has_the_same_version_as_clippy() {
2323

2424
#[test]
2525
fn check_that_clippy_has_the_same_major_version_as_rustc() {
26+
// do not run this test inside the upstream rustc repo:
27+
// https://github.com/rust-lang/rust-clippy/issues/6683
28+
if option_env!("RUSTC_TEST_SUITE").is_some() {
29+
return;
30+
}
31+
2632
let clippy_version = rustc_tools_util::get_version_info!();
2733
let clippy_major = clippy_version.major;
2834
let clippy_minor = clippy_version.minor;

0 commit comments

Comments
 (0)