From c360837ca5c91c9878ae8088bb5482e96fd87c96 Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Sun, 28 Apr 2024 10:25:31 +0100 Subject: [PATCH] cmake, lint: Adjust `lint_includes_build_config` --- test/lint/test_runner/src/main.rs | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/test/lint/test_runner/src/main.rs b/test/lint/test_runner/src/main.rs index 77388b78ffb..1a8c11dd428 100644 --- a/test/lint/test_runner/src/main.rs +++ b/test/lint/test_runner/src/main.rs @@ -318,20 +318,14 @@ Please add any false positives, such as subtrees, or externally sourced files to } fn lint_includes_build_config() -> LintResult { - let config_path = "./src/config/bitcoin-config.h.in"; - if !Path::new(config_path).is_file() { - assert!(Command::new("./autogen.sh") - .status() - .expect("command error") - .success()); - } + let config_path = "./cmake/bitcoin-config.h.in"; let defines_regex = format!( r"^\s*(?!//).*({})", - check_output(Command::new("grep").args(["undef ", "--", config_path])) + check_output(Command::new("grep").args(["define", "--", config_path])) .expect("grep failed") .lines() .map(|line| { - line.split("undef ") + line.split_whitespace() .nth(1) .unwrap_or_else(|| panic!("Could not extract name in line: {line}")) })