Skip to content

Commit f66633d

Browse files
author
MacroFake
committed
Merge bitcoin/bitcoin#25288: test: Reliably don't start itself (lint-all.py runs all tests twice)
f26a496 test: clean up all-lint.py (Martin Leitner-Ankerl) 64d72c4 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 ACK f26a496 Tree-SHA512: b44abdd685f7b48a6a9f48e96d97138b635c31c1c7ab543cb5636b5f49690ccd56fa6fec01ae7fcc16af01a613372ee77632f70c32059919b373aa8051953791
2 parents 581e2bd + f26a496 commit f66633d

File tree

4 files changed

+8
-9
lines changed

4 files changed

+8
-9
lines changed

ci/lint/06_script.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ test/lint/git-subtree-check.sh src/univalue
2222
test/lint/git-subtree-check.sh src/leveldb
2323
test/lint/git-subtree-check.sh src/crc32c
2424
test/lint/check-doc.py
25-
test/lint/lint-all.py
25+
test/lint/all-lint.py
2626

2727
if [ "$CIRRUS_REPO_FULL_NAME" = "bitcoin/bitcoin" ] && [ "$CIRRUS_PR" = "" ] ; then
2828
# Sanity check only the last few commits to get notified of missing sigs,

test/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ test/lint/lint-files.py
327327
You can run all the shell-based lint tests by running:
328328

329329
```
330-
test/lint/lint-all.py
330+
test/lint/all-lint.py
331331
```
332332

333333
# Writing functional tests

test/lint/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,6 @@ To do so, add the upstream repository as remote:
3939
git remote add --fetch secp256k1 https://github.com/bitcoin-core/secp256k1.git
4040
```
4141

42-
lint-all.py
42+
all-lint.py
4343
===========
4444
Calls other scripts with the `lint-` prefix.

test/lint/lint-all.py renamed to test/lint/all-lint.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,10 @@
1313

1414
exit_code = 0
1515
mod_path = Path(__file__).parent
16-
for lint in glob(f"{mod_path}/lint-*"):
17-
if lint != __file__:
18-
result = run([lint])
19-
if result.returncode != 0:
20-
print(f"^---- failure generated from {lint.split('/')[-1]}")
21-
exit_code |= result.returncode
16+
for lint in glob(f"{mod_path}/lint-*.py"):
17+
result = run([lint])
18+
if result.returncode != 0:
19+
print(f"^---- failure generated from {lint.split('/')[-1]}")
20+
exit_code |= result.returncode
2221

2322
exit(exit_code)

0 commit comments

Comments
 (0)