You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge #11789: [tests] [travis-ci] Combine logs on failure
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)
176
-
logging.shutdown()
177
-
sys.exit(TEST_EXIT_FAILED)
160
+
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))
Copy file name to clipboardExpand all lines: test/functional/test_runner.py
+19-7Lines changed: 19 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -15,6 +15,7 @@
15
15
"""
16
16
17
17
importargparse
18
+
fromcollectionsimportdeque
18
19
importconfigparser
19
20
importdatetime
20
21
importos
@@ -174,6 +175,7 @@ def main():
174
175
epilog='''
175
176
Help text and arguments for individual test script:''',
176
177
formatter_class=argparse.RawTextHelpFormatter)
178
+
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.')
177
179
parser.add_argument('--coverage', action='store_true', help='generate a basic coverage report for the RPC interface')
178
180
parser.add_argument('--exclude', '-x', help='specify a comma-separated-list of scripts to exclude.')
179
181
parser.add_argument('--extended', action='store_true', help='run the extended test suite in addition to the basic tests')
0 commit comments