Skip to content

Commit c360837

Browse files
committed
cmake, lint: Adjust lint_includes_build_config
1 parent 3885441 commit c360837

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

test/lint/test_runner/src/main.rs

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -318,20 +318,14 @@ Please add any false positives, such as subtrees, or externally sourced files to
318318
}
319319

320320
fn lint_includes_build_config() -> LintResult {
321-
let config_path = "./src/config/bitcoin-config.h.in";
322-
if !Path::new(config_path).is_file() {
323-
assert!(Command::new("./autogen.sh")
324-
.status()
325-
.expect("command error")
326-
.success());
327-
}
321+
let config_path = "./cmake/bitcoin-config.h.in";
328322
let defines_regex = format!(
329323
r"^\s*(?!//).*({})",
330-
check_output(Command::new("grep").args(["undef ", "--", config_path]))
324+
check_output(Command::new("grep").args(["define", "--", config_path]))
331325
.expect("grep failed")
332326
.lines()
333327
.map(|line| {
334-
line.split("undef ")
328+
line.split_whitespace()
335329
.nth(1)
336330
.unwrap_or_else(|| panic!("Could not extract name in line: {line}"))
337331
})

0 commit comments

Comments
 (0)