diff --git a/src/tools/clippy/tests/versioncheck.rs b/src/tools/clippy/tests/versioncheck.rs index ea540d48a2b92..f6fc2354ca08b 100644 --- a/src/tools/clippy/tests/versioncheck.rs +++ b/src/tools/clippy/tests/versioncheck.rs @@ -93,6 +93,11 @@ fn check_that_clippy_has_the_same_major_version_as_rustc() { #[test] fn check_host_compiler() { + // do not run this test inside the upstream rustc repo: + if option_env!("RUSTC_TEST_SUITE").is_some() { + return; + } + let version = rustc_tools_util::get_version_info!(); assert_eq!(version.host_compiler, Some("nightly".to_string())); }