tests: Write more info and statistics in parallel-vm.log
This is helpful in tracking how the total test execution time changes. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
0ef4b1e1db
commit
a86709b52e
1 changed files with 11 additions and 1 deletions
|
@ -413,7 +413,8 @@ def main():
|
||||||
|
|
||||||
debug_level = logging.INFO
|
debug_level = logging.INFO
|
||||||
rerun_failures = True
|
rerun_failures = True
|
||||||
timestamp = int(time.time())
|
start_time = time.time()
|
||||||
|
timestamp = int(start_time)
|
||||||
|
|
||||||
scriptsdir = os.path.dirname(os.path.realpath(sys.argv[0]))
|
scriptsdir = os.path.dirname(os.path.realpath(sys.argv[0]))
|
||||||
|
|
||||||
|
@ -694,6 +695,15 @@ def main():
|
||||||
print("file://%s/index.html" % logdir)
|
print("file://%s/index.html" % logdir)
|
||||||
logger.info("Code coverage report: file://%s/index.html" % logdir)
|
logger.info("Code coverage report: file://%s/index.html" % logdir)
|
||||||
|
|
||||||
|
end_time = time.time()
|
||||||
|
try:
|
||||||
|
cmd = subprocess.Popen(['git', 'describe'], stdout=subprocess.PIPE)
|
||||||
|
ver = cmd.stdout.read().decode().strip()
|
||||||
|
except:
|
||||||
|
ver = "unknown"
|
||||||
|
pass
|
||||||
|
logger.info("Tests run: {} Tests failed: {} Total time: {} Version: {}".format(total_started, total_failed, end_time - start_time, ver))
|
||||||
|
|
||||||
if double_failed or (failed and not rerun_failures):
|
if double_failed or (failed and not rerun_failures):
|
||||||
logger.info("Test run complete - failures found")
|
logger.info("Test run complete - failures found")
|
||||||
sys.exit(2)
|
sys.exit(2)
|
||||||
|
|
Loading…
Reference in a new issue