core.job: introduce the job.size property

This will return a sum of all len(test_suite.tests) of the current job.
Signed-off-by: NBeraldo Leal <bleal@redhat.com>
上级 6319339a
......@@ -377,6 +377,11 @@ class Job:
suites = [TestSuite.from_config(config) for config in suites_configs]
return cls(job_config, suites)
@property
def size(self):
"""Job size is the sum of all test suites sizes."""
return sum([suite.size for suite in self.test_suites])
@property
def test_parameters(self):
"""Placeholder for test parameters.
......@@ -500,7 +505,7 @@ class Job:
if self.time_start == -1:
self.time_start = time.time()
try:
self.create_test_suite()
self.result.tests_total = self.size
self.pre_tests()
return self.run_tests()
except exceptions.JobBaseException as details:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册