Skip to content

Commit c8390f1

Browse files
nashifAnas Nashif
authored andcommitted
sanitycheck: rename qemu_time to handler time
This can be used by other handlers and is defined in the main Handler class. Qemu is just an implementer. Signed-off-by: Anas Nashif <[email protected]>
1 parent 8b11a1f commit c8390f1

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

scripts/sanitycheck

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ class Handler:
280280
self.lock = threading.Lock()
281281
self.state = "waiting"
282282
self.metrics = {}
283-
self.metrics["qemu_time"] = 0
283+
self.metrics["handler_time"] = 0
284284
self.metrics["ram_size"] = 0
285285
self.metrics["rom_size"] = 0
286286
self.unit = unit
@@ -423,9 +423,9 @@ class QEMUHandler(Handler):
423423
# APIs. Add whatever gets reported to the metrics dictionary
424424
line = ""
425425

426-
metrics["qemu_time"] = time.time() - start_time
426+
metrics["handler_time"] = time.time() - start_time
427427
verbose("QEMU complete (%s) after %f seconds" %
428-
(out_state, metrics["qemu_time"]))
428+
(out_state, metrics["handler_time"]))
429429
handler.set_state(out_state, metrics)
430430

431431
log_out_fp.close()
@@ -1773,7 +1773,7 @@ class TestSuite:
17731773
eleTestsuite = ET.SubElement(eleTestsuites, 'testsuite', name=run, time="%d" %duration,
17741774
tests="%d" %(errors + passes + fails), failures="%d" %fails, errors="%d" %errors, skip="0")
17751775

1776-
qemu_time = "0"
1776+
handler_time = "0"
17771777
for name, goal in self.goals.items():
17781778

17791779
i = self.instances[name]
@@ -1783,9 +1783,9 @@ class TestSuite:
17831783
eleTestsuite.remove(tc)
17841784

17851785
if not goal.failed and goal.qemu:
1786-
qemu_time = "%s" %(goal.metrics["qemu_time"])
1786+
handler_time = "%s" %(goal.metrics["handler_time"])
17871787

1788-
eleTestcase = ET.SubElement(eleTestsuite, 'testcase', classname="%s:%s" %(i.platform.name, i.test.name), name="%s" %(name), time=qemu_time)
1788+
eleTestcase = ET.SubElement(eleTestsuite, 'testcase', classname="%s:%s" %(i.platform.name, i.test.name), name="%s" %(name), time=handler_time)
17891789
if goal.failed:
17901790
failure = ET.SubElement(eleTestcase, 'failure', type="failure", message=goal.reason)
17911791
p = ("%s/%s/%s" %(args.outdir, i.platform.name, i.test.name))
@@ -1811,7 +1811,7 @@ class TestSuite:
18111811

18121812
with open(filename, "wt") as csvfile:
18131813
fieldnames = ["test", "arch", "platform", "passed", "status",
1814-
"extra_args", "qemu", "qemu_time", "ram_size",
1814+
"extra_args", "qemu", "handler_time", "ram_size",
18151815
"rom_size"]
18161816
cw = csv.DictWriter(csvfile, fieldnames, lineterminator=os.linesep)
18171817
cw.writeheader()
@@ -1828,7 +1828,7 @@ class TestSuite:
18281828
else:
18291829
rowdict["passed"] = True
18301830
if goal.qemu:
1831-
rowdict["qemu_time"] = goal.metrics["qemu_time"]
1831+
rowdict["handler_time"] = goal.metrics["handler_time"]
18321832
rowdict["ram_size"] = goal.metrics["ram_size"]
18331833
rowdict["rom_size"] = goal.metrics["rom_size"]
18341834
cw.writerow(rowdict)

0 commit comments

Comments
 (0)