aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Newbery <john@johnnewbery.com>2017-11-29 13:21:51 -0500
committerJohn Newbery <john@johnnewbery.com>2017-11-29 13:29:15 -0500
commitbba1c54edd73406e66ddae5ae2ac90183c3582bf (patch)
tree732f73474a8e9cca26dd4bef1112442e6d4988ce
parent32c9b570fceaad76536a2c881b4dc1d961d9b306 (diff)
[tests] Improve logging shutdown and add hint for combine_logs
-rwxr-xr-xtest/functional/test_framework/test_framework.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/test/functional/test_framework/test_framework.py b/test/functional/test_framework/test_framework.py
index 4590b4c650..102babb9f4 100755
--- a/test/functional/test_framework/test_framework.py
+++ b/test/functional/test_framework/test_framework.py
@@ -167,14 +167,16 @@ class BitcoinTestFramework():
if success == TestStatus.PASSED:
self.log.info("Tests successful")
- sys.exit(TEST_EXIT_PASSED)
+ exit_code = TEST_EXIT_PASSED
elif success == TestStatus.SKIPPED:
self.log.info("Test skipped")
- sys.exit(TEST_EXIT_SKIPPED)
+ exit_code = TEST_EXIT_SKIPPED
else:
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))
+ exit_code = TEST_EXIT_FAILED
+ logging.shutdown()
+ sys.exit(exit_code)
# Methods to override in subclass test scripts.
def set_test_params(self):