aboutsummaryrefslogtreecommitdiff
path: root/test/lint
diff options
context:
space:
mode:
authorMarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>2024-02-08 13:43:38 +0100
committerMarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>2024-02-20 15:02:12 +0100
commitfa100512677587b4e84a8be2235cf6d49b6a0134 (patch)
tree11cd2fe7e09707aa028a1688c7a8144fbaf5d7ef /test/lint
parent45b2a91897ca8f4a3e0c1adcfb30cf570971da4e (diff)
downloadbitcoin-fa100512677587b4e84a8be2235cf6d49b6a0134.tar.xz
lint: Add get_subtrees() helper
This is needed for a future change.
Diffstat (limited to 'test/lint')
-rw-r--r--test/lint/test_runner/src/main.rs19
1 files changed, 12 insertions, 7 deletions
diff --git a/test/lint/test_runner/src/main.rs b/test/lint/test_runner/src/main.rs
index 1dc79e97bd..28644f839c 100644
--- a/test/lint/test_runner/src/main.rs
+++ b/test/lint/test_runner/src/main.rs
@@ -34,17 +34,22 @@ fn get_git_root() -> PathBuf {
PathBuf::from(check_output(git().args(["rev-parse", "--show-toplevel"])).unwrap())
}
+/// Return all subtree paths
+fn get_subtrees() -> Vec<&'static str> {
+ vec![
+ "src/crc32c",
+ "src/crypto/ctaes",
+ "src/leveldb",
+ "src/minisketch",
+ "src/secp256k1",
+ ]
+}
+
fn lint_subtree() -> LintResult {
// This only checks that the trees are pure subtrees, it is not doing a full
// check with -r to not have to fetch all the remotes.
let mut good = true;
- for subtree in [
- "src/crypto/ctaes",
- "src/secp256k1",
- "src/minisketch",
- "src/leveldb",
- "src/crc32c",
- ] {
+ for subtree in get_subtrees() {
good &= Command::new("test/lint/git-subtree-check.sh")
.arg(subtree)
.status()