Skip to content

Commit bba1c54

Browse files
committed
[tests] Improve logging shutdown and add hint for combine_logs
1 parent 32c9b57 commit bba1c54

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

test/functional/test_framework/test_framework.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -167,14 +167,16 @@ def main(self):
167167

168168
if success == TestStatus.PASSED:
169169
self.log.info("Tests successful")
170-
sys.exit(TEST_EXIT_PASSED)
170+
exit_code = TEST_EXIT_PASSED
171171
elif success == TestStatus.SKIPPED:
172172
self.log.info("Test skipped")
173-
sys.exit(TEST_EXIT_SKIPPED)
173+
exit_code = TEST_EXIT_SKIPPED
174174
else:
175175
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)
176+
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))
177+
exit_code = TEST_EXIT_FAILED
178+
logging.shutdown()
179+
sys.exit(exit_code)
178180

179181
# Methods to override in subclass test scripts.
180182
def set_test_params(self):

0 commit comments

Comments
 (0)