aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2022-11-28 17:27:28 +0100
committerMarcoFalke <falke.marco@gmail.com>2022-11-28 17:27:34 +0100
commitf668a3a85933512e7efc369b5b2922d44b4bad82 (patch)
tree4fc800a2e4ea73b7dbba06ecad3c24c56d1f6597 /test
parentc1061be14a515b0ed4f4d646fcd0378c62e6ded3 (diff)
parentfad1c55301b9f2d091d3b0d8a75ff522ce8dae5a (diff)
downloadbitcoin-f668a3a85933512e7efc369b5b2922d44b4bad82.tar.xz
Merge bitcoin/bitcoin#26591: [24.x] ci: Skip COMMIT_RANGE if no CIRRUS_PR
fad1c55301b9f2d091d3b0d8a75ff522ce8dae5a lint: Skip COMMIT_RANGE if no CIRRUS_PR (MarcoFalke) Pull request description: Identical commit from https://github.com/bitcoin/bitcoin/pull/26588 Untested, but this may fix the red-ness in https://cirrus-ci.com/github/bitcoin/bitcoin/24.x, e.g. https://cirrus-ci.com/task/4697153604419584: Backport requested in https://github.com/bitcoin/bitcoin/pull/26588#issuecomment-1328916876 ACKs for top commit: hebasto: ACK fad1c55301b9f2d091d3b0d8a75ff522ce8dae5a, the same commit as in #26588. Tree-SHA512: 8d8a735e25bc1f774f8cbf058b95b7019941138ab78fb7819852755c7a416a783ee116457b97031d447639002353d7bf12ee8445275b7b5eec4abc7421cc171d
Diffstat (limited to 'test')
-rwxr-xr-xtest/lint/lint-git-commit-check.py2
-rwxr-xr-xtest/lint/lint-whitespace.py2
2 files changed, 4 insertions, 0 deletions
diff --git a/test/lint/lint-git-commit-check.py b/test/lint/lint-git-commit-check.py
index a1d03370e8..049104398a 100755
--- a/test/lint/lint-git-commit-check.py
+++ b/test/lint/lint-git-commit-check.py
@@ -46,6 +46,8 @@ def main():
commit_range = merge_base + "..HEAD"
else:
commit_range = os.getenv("COMMIT_RANGE")
+ if commit_range == "SKIP_EMPTY_NOT_A_PR":
+ sys.exit(0)
commit_hashes = check_output(["git", "log", commit_range, "--format=%H"], universal_newlines=True, encoding="utf8").splitlines()
diff --git a/test/lint/lint-whitespace.py b/test/lint/lint-whitespace.py
index 3fb5b80013..72b7ebc394 100755
--- a/test/lint/lint-whitespace.py
+++ b/test/lint/lint-whitespace.py
@@ -97,6 +97,8 @@ def main():
commit_range = merge_base + "..HEAD"
else:
commit_range = os.getenv("COMMIT_RANGE")
+ if commit_range == "SKIP_EMPTY_NOT_A_PR":
+ sys.exit(0)
whitespace_selection = []
tab_selection = []