mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-03 09:56:38 -05:00
Merge bitcoin/bitcoin#25288: test: Reliably don't start itself (lint-all.py runs all tests twice)
f26a496dfd
test: clean up all-lint.py (Martin Leitner-Ankerl)64d72c4c87
test: rename lint-all.py to all-lint.py (Martin Leitner-Ankerl) Pull request description: When running `./test/lint/lint-all.py`, the script runs all tests but also calls itself because the comparison with `__file__` doesn't work. Comparing resolved paths gives reliable comparison, and lint-all.py doesn't call itself any more ACKs for top commit: laanwj: Code review ACKf26a496dfd
Tree-SHA512: b44abdd685f7b48a6a9f48e96d97138b635c31c1c7ab543cb5636b5f49690ccd56fa6fec01ae7fcc16af01a613372ee77632f70c32059919b373aa8051953791
This commit is contained in:
commit
f66633d9cb
4 changed files with 8 additions and 9 deletions
|
@ -22,7 +22,7 @@ test/lint/git-subtree-check.sh src/univalue
|
|||
test/lint/git-subtree-check.sh src/leveldb
|
||||
test/lint/git-subtree-check.sh src/crc32c
|
||||
test/lint/check-doc.py
|
||||
test/lint/lint-all.py
|
||||
test/lint/all-lint.py
|
||||
|
||||
if [ "$CIRRUS_REPO_FULL_NAME" = "bitcoin/bitcoin" ] && [ "$CIRRUS_PR" = "" ] ; then
|
||||
# Sanity check only the last few commits to get notified of missing sigs,
|
||||
|
|
|
@ -327,7 +327,7 @@ test/lint/lint-files.py
|
|||
You can run all the shell-based lint tests by running:
|
||||
|
||||
```
|
||||
test/lint/lint-all.py
|
||||
test/lint/all-lint.py
|
||||
```
|
||||
|
||||
# Writing functional tests
|
||||
|
|
|
@ -39,6 +39,6 @@ To do so, add the upstream repository as remote:
|
|||
git remote add --fetch secp256k1 https://github.com/bitcoin-core/secp256k1.git
|
||||
```
|
||||
|
||||
lint-all.py
|
||||
all-lint.py
|
||||
===========
|
||||
Calls other scripts with the `lint-` prefix.
|
||||
|
|
|
@ -13,11 +13,10 @@ 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
|
||||
for lint in glob(f"{mod_path}/lint-*.py"):
|
||||
result = run([lint])
|
||||
if result.returncode != 0:
|
||||
print(f"^---- failure generated from {lint.split('/')[-1]}")
|
||||
exit_code |= result.returncode
|
||||
|
||||
exit(exit_code)
|
Loading…
Add table
Reference in a new issue