test: rename lint-all.py to all-lint.py

That way it is impossible for the script to call itself.
This commit is contained in:
Martin Leitner-Ankerl
2022-06-07 10:22:45 +02:00
parent 1b2e1d179c
commit 64d72c4c87
4 changed files with 3 additions and 3 deletions

23
test/lint/all-lint.py Executable file
View File

@@ -0,0 +1,23 @@
#!/usr/bin/env python3
#
# Copyright (c) 2017-2022 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# This script runs all test/lint/lint-* files, and fails if any exit
# with a non-zero status code.
from glob import glob
from pathlib import Path
from subprocess import run
exit_code = 0
mod_path = Path(__file__).parent
for lint in glob(f"{mod_path}/lint-*"):
if lint != __file__:
result = run([lint])
if result.returncode != 0:
print(f"^---- failure generated from {lint.split('/')[-1]}")
exit_code |= result.returncode
exit(exit_code)