aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2022-11-28 13:59:45 +0100
committerMarcoFalke <falke.marco@gmail.com>2022-11-28 13:59:54 +0100
commit593979494042e77b5271d42b8f6e7b514e0007d8 (patch)
treedcea8ec478e57e0188e2791cc18b2598237d916b /test
parent00c323610a30572ff15420d68f5432a3cb9757e5 (diff)
parent9b5feb76bc9458eec806db677af6161b56b8b23f (diff)
Merge bitcoin/bitcoin#26589: test: small fixups/improvements for get_previous_releases.py
9b5feb76bc9458eec806db677af6161b56b8b23f script: small fixups/improvements for get_previous_releases.py (Sebastian Falbesoner) Pull request description: This is a small follow-up to #25650 (commit 614d4682badaadac74b825a45aaee9c2309a3e81) with three fixes/improvements: - fix "Checksum did not match" detection, which was not adapted to the new `SHA256_SUMS` structure and hence never executed (the list of tarball names isn't directly in the dictionary's values anymore, but has to be extracted from the `'tarball'` field of each value) - make both help text and default tag download order deterministic by sorting default tags - `--tags` argument help text: add missing space between "for" and "backwards" ACKs for top commit: Sjors: tACK 9b5feb76bc9458eec806db677af6161b56b8b23f. Tested that if I change a checksum, or remove a release, it catches that. josibake: tested ACK https://github.com/bitcoin/bitcoin/pull/26589/commits/9b5feb76bc9458eec806db677af6161b56b8b23f Tree-SHA512: 791fa693477eebbda7fd41f3f5ec78fe7eab57df06979aa907ab258a6945534bdc3b931ddfce0fb440c9666b98c88ce5e1b6dc353ed39e129e87d3634855165c
Diffstat (limited to 'test')
-rwxr-xr-xtest/get_previous_releases.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/test/get_previous_releases.py b/test/get_previous_releases.py
index c983dce619..ca06d7b8f8 100755
--- a/test/get_previous_releases.py
+++ b/test/get_previous_releases.py
@@ -136,7 +136,7 @@ def download_binary(tag, args) -> int:
tarballHash = hasher.hexdigest()
if tarballHash not in SHA256_SUMS or SHA256_SUMS[tarballHash]['tarball'] != tarball:
- if tarball in SHA256_SUMS.values():
+ if tarball in [v['tarball'] for v in SHA256_SUMS.values()]:
print("Checksum did not match")
return 1
@@ -260,11 +260,10 @@ if __name__ == '__main__':
help='download release binary.')
parser.add_argument('-t', '--target-dir', action='store',
help='target directory.', default='releases')
- parser.add_argument('tags', nargs='*', default=set(
- [v['tag'] for v in SHA256_SUMS.values()]
- ),
+ all_tags = sorted([*set([v['tag'] for v in SHA256_SUMS.values()])])
+ parser.add_argument('tags', nargs='*', default=all_tags,
help='release tags. e.g.: v0.18.1 v0.20.0rc2 '
- '(if not specified, the full list needed for'
+ '(if not specified, the full list needed for '
'backwards compatibility tests will be used)'
)
args = parser.parse_args()