aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMacroFake <falke.marco@gmail.com>2022-06-07 10:37:29 +0200
committerMacroFake <falke.marco@gmail.com>2022-06-07 10:37:34 +0200
commitf66633d9cbe79f4ef4048fca6f16d914d257f77c (patch)
treeb9c1cff3f443ac9bdd0c907b30cb8f7a9af347d7 /test
parent581e2bdbac6f531ee4bdd8b3c9b317740bfe5cbf (diff)
parentf26a496dfd0a7ce3833a10075027d7d5b0345e32 (diff)
downloadbitcoin-f66633d9cbe79f4ef4048fca6f16d914d257f77c.tar.xz
Merge bitcoin/bitcoin#25288: test: Reliably don't start itself (lint-all.py runs all tests twice)
f26a496dfd0a7ce3833a10075027d7d5b0345e32 test: clean up all-lint.py (Martin Leitner-Ankerl) 64d72c4c8734b9dd45cb61cb2c2baf98766b0163 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 f26a496dfd0a7ce3833a10075027d7d5b0345e32 Tree-SHA512: b44abdd685f7b48a6a9f48e96d97138b635c31c1c7ab543cb5636b5f49690ccd56fa6fec01ae7fcc16af01a613372ee77632f70c32059919b373aa8051953791
Diffstat (limited to 'test')
-rw-r--r--test/README.md2
-rw-r--r--test/lint/README.md2
-rwxr-xr-xtest/lint/all-lint.py (renamed from test/lint/lint-all.py)11
3 files changed, 7 insertions, 8 deletions
diff --git a/test/README.md b/test/README.md
index 0d9b9fb89b..6ca7cc0016 100644
--- a/test/README.md
+++ b/test/README.md
@@ -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
diff --git a/test/lint/README.md b/test/lint/README.md
index 1f683c10b3..a23211a72b 100644
--- a/test/lint/README.md
+++ b/test/lint/README.md
@@ -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.
diff --git a/test/lint/lint-all.py b/test/lint/all-lint.py
index c280ba2db2..34a7b9742a 100755
--- a/test/lint/lint-all.py
+++ b/test/lint/all-lint.py
@@ -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)