ff8a9b0 [tests] Add combinedlogslen argument to test_runner.py (John Newbery)
dba94ea [tests] [travis-ci] Move Travis functional test log post processing to test_runner (John Newbery)
bba1c54 [tests] Improve logging shutdown and add hint for combine_logs (John Newbery)
Pull request description:
Replaces #11779 . Notes from that PR:
> Currently, when a functional test fails, the debug logs are printed sequentially to the travis log. This makes debugging race conditions based on the travis log hard. Instead, all logs events should be combined and sorted by their timestamp, then appended to the travis log.
@MarcoFalke
Tree-SHA512: 56c80067d6a2c92f7e6a35e3ae5160637a0de052d9da593c7be6e02233544a93c66d62456f903f85e2edc09e31ab4bdafd1aed1d9897ae48c634f82631f856f7
self.log.error("Test failed. Test logging available at %s/test_framework.log",self.options.tmpdir)
logging.shutdown()
sys.exit(TEST_EXIT_FAILED)
self.log.error("Hint: Call {}'{}' to consolidate all logs".format(os.path.normpath(os.path.dirname(os.path.realpath(__file__))+"/../combine_logs.py"),self.options.tmpdir))
@ -15,6 +15,7 @@ For a description of arguments recognized by test scripts, see
"""
importargparse
fromcollectionsimportdeque
importconfigparser
importdatetime
importos
@ -174,6 +175,7 @@ def main():
epilog='''
Helptextandargumentsforindividualtestscript:''',
formatter_class=argparse.RawTextHelpFormatter)
parser.add_argument('--combinedlogslen','-c',type=int,default=0,help='print a combined log (of length n lines) from all test nodes and test framework to the console on failure.')
parser.add_argument('--coverage',action='store_true',help='generate a basic coverage report for the RPC interface')
parser.add_argument('--exclude','-x',help='specify a comma-separated-list of scripts to exclude.')
parser.add_argument('--extended',action='store_true',help='run the extended test suite in addition to the basic tests')