Skip to content
Snippets Groups Projects
Commit 2542bf81 authored by Daniel Salzman's avatar Daniel Salzman
Browse files

func-tests: add time and flush to the case log

parent e8134304
No related branches found
No related tags found
No related merge requests found
......@@ -2,6 +2,7 @@
import inspect
import os
import time
import dnstest.params as params
......@@ -30,8 +31,9 @@ def test_info():
def check_log(text, stdout=False):
'''Log message header'''
msg = "%s (%s)" % (str(text), test_info())
msg = "(%s) %s (%s)" % (time.strftime("%H:%M:%S"), str(text), test_info())
params.case_log.write(msg + "\n")
params.case_log.flush()
if stdout and params.debug:
print(msg)
......@@ -40,6 +42,7 @@ def detail_log(text, stdout=False):
msg = str(text)
params.case_log.write(msg + "\n")
params.case_log.flush()
if stdout and params.debug:
print(msg)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment