]> git.lizzy.rs Git - rust.git/commitdiff
tests: ignore check_that_clippy_has_the_same_major_version_as_rustc() inside the...
authorMatthias Krüger <matthias.krueger@famsik.de>
Fri, 5 Feb 2021 23:56:54 +0000 (00:56 +0100)
committerMatthias Krüger <matthias.krueger@famsik.de>
Fri, 5 Feb 2021 23:56:54 +0000 (00:56 +0100)
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

tests/versioncheck.rs

index 76b6126c76c6a640b98491587f721a592aece397..bc5ed0816cc812b139a5f7f299fbfdbb174b45fb 100644 (file)
@@ -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() {
+        return;
+    }
+
     let clippy_version = rustc_tools_util::get_version_info!();
     let clippy_major = clippy_version.major;
     let clippy_minor = clippy_version.minor;