summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/dogfood.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/clippy/tests/dogfood.rs')
-rw-r--r--src/tools/clippy/tests/dogfood.rs12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/tools/clippy/tests/dogfood.rs b/src/tools/clippy/tests/dogfood.rs
index afde31fac..3f16c180e 100644
--- a/src/tools/clippy/tests/dogfood.rs
+++ b/src/tools/clippy/tests/dogfood.rs
@@ -28,6 +28,7 @@ fn dogfood_clippy() {
"clippy_dev",
"clippy_lints",
"clippy_utils",
+ "clippy_config",
"lintcheck",
"rustc_tools_util",
] {
@@ -56,7 +57,10 @@ fn run_metadata_collection_lint() {
// Run collection as is
std::env::set_var("ENABLE_METADATA_COLLECTION", "1");
- run_clippy_for_package("clippy_lints", &["-A", "unfulfilled_lint_expectations"]);
+ assert!(run_clippy_for_package(
+ "clippy_lints",
+ &["-A", "unfulfilled_lint_expectations"]
+ ));
// Check if cargo caching got in the way
if let Ok(file) = File::open(metadata_output_path) {
@@ -79,9 +83,13 @@ fn run_metadata_collection_lint() {
.unwrap();
// Running the collection again
- run_clippy_for_package("clippy_lints", &["-A", "unfulfilled_lint_expectations"]);
+ assert!(run_clippy_for_package(
+ "clippy_lints",
+ &["-A", "unfulfilled_lint_expectations"]
+ ));
}
+#[must_use]
fn run_clippy_for_package(project: &str, args: &[&str]) -> bool {
let root_dir = PathBuf::from(env!("CARGO_MANIFEST_DIR"));