Remove travis_wait from lint script
Also adding progress logging to verify-commits.py script to prevent Travis from timing out
This commit is contained in:
parent
b853746d4a
commit
8b8d8eeae9
2 changed files with 11 additions and 1 deletions
|
@ -21,5 +21,5 @@ test/lint/lint-all.sh
|
||||||
if [ "$TRAVIS_REPO_SLUG" = "bitcoin/bitcoin" -a "$TRAVIS_EVENT_TYPE" = "cron" ]; then
|
if [ "$TRAVIS_REPO_SLUG" = "bitcoin/bitcoin" -a "$TRAVIS_EVENT_TYPE" = "cron" ]; then
|
||||||
git log --merges --before="2 days ago" -1 --format='%H' > ./contrib/verify-commits/trusted-sha512-root-commit
|
git log --merges --before="2 days ago" -1 --format='%H' > ./contrib/verify-commits/trusted-sha512-root-commit
|
||||||
while read -r LINE; do travis_retry gpg --keyserver hkp://subset.pool.sks-keyservers.net --recv-keys $LINE; done < contrib/verify-commits/trusted-keys &&
|
while read -r LINE; do travis_retry gpg --keyserver hkp://subset.pool.sks-keyservers.net --recv-keys $LINE; done < contrib/verify-commits/trusted-keys &&
|
||||||
travis_wait 50 contrib/verify-commits/verify-commits.py --clean-merge=2;
|
./contrib/verify-commits/verify-commits.py --clean-merge=2;
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
"""Verify commits against a trusted keys list."""
|
"""Verify commits against a trusted keys list."""
|
||||||
import argparse
|
import argparse
|
||||||
import hashlib
|
import hashlib
|
||||||
|
import logging
|
||||||
import os
|
import os
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
|
@ -66,6 +67,11 @@ def tree_sha512sum(commit='HEAD'):
|
||||||
return overall.hexdigest()
|
return overall.hexdigest()
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|
||||||
|
# Enable debug logging if running in CI
|
||||||
|
if 'CI' in os.environ and os.environ['CI'].lower() == "true":
|
||||||
|
logging.getLogger().setLevel(logging.DEBUG)
|
||||||
|
|
||||||
# Parse arguments
|
# Parse arguments
|
||||||
parser = argparse.ArgumentParser(usage='%(prog)s [options] [commit id]')
|
parser = argparse.ArgumentParser(usage='%(prog)s [options] [commit id]')
|
||||||
parser.add_argument('--disable-tree-check', action='store_false', dest='verify_tree', help='disable SHA-512 tree check')
|
parser.add_argument('--disable-tree-check', action='store_false', dest='verify_tree', help='disable SHA-512 tree check')
|
||||||
|
@ -95,6 +101,10 @@ def main():
|
||||||
|
|
||||||
# Iterate through commits
|
# Iterate through commits
|
||||||
while True:
|
while True:
|
||||||
|
|
||||||
|
# Log a message to prevent Travis from timing out
|
||||||
|
logging.debug("verify-commits: [in-progress] processing commit {}".format(current_commit[:8]))
|
||||||
|
|
||||||
if current_commit == verified_root:
|
if current_commit == verified_root:
|
||||||
print('There is a valid path from "{}" to {} where all commits are signed!'.format(initial_commit, verified_root))
|
print('There is a valid path from "{}" to {} where all commits are signed!'.format(initial_commit, verified_root))
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
Loading…
Add table
Reference in a new issue