aboutsummaryrefslogtreecommitdiff
path: root/contrib/verify-commits
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2019-03-29 11:22:20 -0400
committerMarcoFalke <falke.marco@gmail.com>2019-03-29 11:23:08 -0400
commit904129b35dd6111064cad2ace777462ff7edce33 (patch)
tree31cf968874da593637ecd129d6ba954a3b86d74d /contrib/verify-commits
parentedc68d40e9689f74f4cdfba010691e9811786086 (diff)
parent8b8d8eeae9e8feff6d78420ee172c820ccef9db1 (diff)
downloadbitcoin-904129b35dd6111064cad2ace777462ff7edce33.tar.xz
Merge #15255: [tests] Remove travis_wait from lint script
8b8d8eeae9 Remove travis_wait from lint script (Graham Krizek) Pull request description: Using the `travis_wait` command in conjunction with `set -o errexit` causes problems. The `travis_wait` command will correctly log the command's output if successful, but if the command fails the process exits before the `travis_wait` command can dump the logs. This will hide important debugging information like error messages and stack traces. We ran into this in #15196 and it was very hard to debug because output was being suppressed. `travis_wait` was being used because the `contrib/verify-commits/verify-commits.py` script can sometimes run for a long time without producing any output. If a script runs for 10 minutes without logging anything, the CI run times out. The `travis_wait` command will extend this timeout by logging a message for you, while sending stderr and stdout to a file. This PR removes the `travis_wait` command from our CI system and adds additional logging to the `verify-commits.py` script so it doesn't make Travis timeout. ACKs for commit 8b8d8e: MarcoFalke: utACK 8b8d8eeae9e8feff6d78420ee172c820ccef9db1 Tree-SHA512: 175a8dd3f4d4e03ab272ddba94fa8bb06875c9027c3f3f81577feda4bc8918b5f0e003a19027f04f8cf2d0b56c68633716a6ab23f95b910121a8d1132428767d
Diffstat (limited to 'contrib/verify-commits')
-rwxr-xr-xcontrib/verify-commits/verify-commits.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/contrib/verify-commits/verify-commits.py b/contrib/verify-commits/verify-commits.py
index 6bbed01073..255ce75092 100755
--- a/contrib/verify-commits/verify-commits.py
+++ b/contrib/verify-commits/verify-commits.py
@@ -5,6 +5,7 @@
"""Verify commits against a trusted keys list."""
import argparse
import hashlib
+import logging
import os
import subprocess
import sys
@@ -66,6 +67,11 @@ def tree_sha512sum(commit='HEAD'):
return overall.hexdigest()
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
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')
@@ -95,6 +101,10 @@ def main():
# Iterate through commits
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:
print('There is a valid path from "{}" to {} where all commits are signed!'.format(initial_commit, verified_root))
sys.exit(0)