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

tests-extra: extend test summary with the total time

parent f2273486
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/env python3
import argparse, importlib, logging, os, re, sys, tempfile, time, traceback
import argparse, datetime, importlib, logging, os, re, sys, tempfile, time, traceback
current_dir = os.path.dirname(os.path.realpath(__file__))
sys.path.append(current_dir + "/tools")
import dnstest.params as params
......@@ -121,6 +121,8 @@ def main(args):
log.info("KNOT TESTING SUITE %s" % today)
log.info("Working directory %s" % outs_dir)
ref_time = datetime.datetime.now().replace(microsecond=0)
case_cnt = 0
fail_cnt = 0
skip_cnt = 0
......@@ -234,10 +236,12 @@ def main(args):
params.case_log.close()
time_diff = datetime.datetime.now().replace(microsecond=0) - ref_time
msg_time = "TOTAL TIME: %s, " % time_diff
msg_cases = "TEST CASES: %i" % case_cnt
msg_skips = ", SKIPPED: %i" % skip_cnt if skip_cnt > 0 else ""
msg_res = ", FAILED: %i" % fail_cnt if fail_cnt > 0 else ", SUCCESS"
log.info(msg_cases + msg_skips + msg_res)
log.info(msg_time + msg_cases + msg_skips + msg_res)
if fail_cnt:
log_failed(outs_dir, "Total %i/%i" % (fail_cnt, case_cnt), indent=False)
......
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