]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
buildman: Start the clock when the build starts
authorSimon Glass <sjg@chromium.org>
Thu, 7 Sep 2023 16:00:19 +0000 (10:00 -0600)
committerSimon Glass <sjg@chromium.org>
Sat, 23 Sep 2023 18:31:25 +0000 (12:31 -0600)
The Kconfig and maintainer processing can take a while, sometimes 5
seconds or more. This skews the timing printed by buildmand when the build
completes. Start the clock when the threads start to avoid this problem.

Signed-off-by: Simon Glass <sjg@chromium.org>
Suggested-by: Tom Rini <trini@konsulko.com>
tools/buildman/builder.py

index ecbd368c47a5d3b0f9dc1cb73f901754ea13b168..5305477c5be622684dc13f98cee6fafe2857e451 100644 (file)
@@ -328,7 +328,7 @@ class Builder:
         self._build_period_us = None
         self._complete_delay = None
         self._next_delay_update = datetime.now()
-        self._start_time = datetime.now()
+        self._start_time = None
         self._step = step
         self._error_lines = 0
         self.no_subdirs = no_subdirs
@@ -1778,6 +1778,7 @@ class Builder:
         self._prepare_output_space()
         if not self._ide:
             tprint('\rStarting build...', newline=False)
+        self._start_time = datetime.now()
         self.setup_build(board_selected, commits)
         self.process_result(None)
         self.thread_exceptions = []