twister: measure build time and report it in json output

Measure both cmake and make/ninja build times and log them in debug mode
and additionally put the result in the json report for tracking build
times.

Cleanup what build/cmake function return and remove unused keys in the
result map.

Remove some excessive logging of launched jobs or default platforms that
gets in the way when in debug mode.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
Anas Nashif 2023-11-22 16:30:10 -05:00
commit 2ba6bcf906
4 changed files with 38 additions and 31 deletions

View file

@ -304,6 +304,7 @@ class Reporting:
if instance.status is not None:
suite["execution_time"] = f"{float(handler_time):.2f}"
suite["build_time"] = f"{float(instance.build_time):.2f}"
testcases = []