From patchwork Mon Mar 16 15:47:12 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1999 Return-Path: X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1773676124; bh=K5+KLECpcwOCvvcbMeEo3sUU/XWbiRXaLruXWmIcNr0=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=ntDD1rNI5yRGJmXtmKz8mQg7BFji0RKREQI78B1pv7iVeDX40KHxkQ2cz97b7Eeu+ vY1eVhG331cTUnwlT+qaF7N4eczVfcQLB/4j/A65AW48snCke5jI3cCT1fWpHK6Mu9 nfcktoBaCfVrcyGUdcjYVqC4D5RHo7x3qcs9D8Lwyi1kXupFFbES7TXcaQeGfh2qi6 JpBNCiOFZtql/kOHRBJ4d514rtB9XfX4fYp07pMIdrhQOj7wAOLgAW562wzJuu2bXR GTWr6b9eIFOqFiN+dK3mdNK4KuiPJPvr0+o4gecYy5x/DS/7uUu6IEQxq4hRKO/ITn +7/E+DkAmtl2w== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 490E46A08C for ; Mon, 16 Mar 2026 09:48:44 -0600 (MDT) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id zqDJlvWWVyxC for ; Mon, 16 Mar 2026 09:48:44 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1773676123; bh=K5+KLECpcwOCvvcbMeEo3sUU/XWbiRXaLruXWmIcNr0=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=i0D/7vWWaiYE/5TW5cWGQXRn1082JhwH8RUh5andmUPjKTutFgTJ8xtcbH+DHUCyi JwXGqFJOKyeeVTJa1pWXhY9EVtjEDpYbrI35CEA5odC7aiec/mxxLS3msX4SsaS3fG c1GKG5MWHAenbev1Hgh2cXybgDPe6Kszk1wCh7eR5yI2ynTHqi8qcJwCy2mFoR5Z1L rE1NgiQBJoRWf0R7nF57Ulz2T7QTH7ZP2fWOgapsQUkZ19hxjOnLYaGzZWSBBHteTY yW0sOJlCE5aSsYLrcNU2pVUuqlCSiTuRknFDvYOa1fzyIr4Gu8Q+mKcuJzCwI4P82i hO803lHd+rgeQ== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 2EB0D6A081 for ; Mon, 16 Mar 2026 09:48:43 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1773676121; bh=g3aZyhQWR+wv0d70IpuOX7O5CYgMRfxHhlE9WNadBzU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CoEZkr60VxoegQQeE+PzOgif2HqWY5iPJx9NmPGDZkePrDkzbLRlzQsP2o7SU7+sc N3QOZdHNcHnnXYp4ktecoIzzDKqTTAL+o4b1sw9T5/xjLet4WvDWdDmKiWJIWqf1D4 8NLcIckc7x445qvit5M0RTcnKmd/3+SVzkcosPbMVTngg/9m+PZkWsodF+u2/ikZ+M TEZ59iVvSWeWGgRYvORMCT2Yjsgz62umtwZxdMLqO+J685BX0UQGDkO++kDlAAMMAQ nRuaiRs+7Bhc/ROTerPamhGto10BCLnaXiuEqqiracdSNiWCJbnCRDSiKO7rjbegRi 86bTz1auS9P7g== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id BFC496A092; Mon, 16 Mar 2026 09:48:41 -0600 (MDT) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id QnLkgwxsdgrC; Mon, 16 Mar 2026 09:48:41 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1773676115; bh=+yy4yxIy4QMzHBQ2xGxZIplTyCfteYnqI3KwzIhNjFE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kgc9M92dA3hxDldGbmORCLBuy9g3eyUDDThmaHNYsTjgojLO1LSh/Ag3gwDxsxMpb 1uZhaUuVx2kLBT0x8cBoCXOG/WChoik5hmJT6YuOCO5s7o8NjwCgApBe6i5RiHUYxe +fO3xXXmAJs3MRzRmFYxuagkhCVkl5dR/95lgQi71IJ5j5sEN/CcmFplrrsa76yy8D EKaCznfXYa3tVrqBeNNAxz/FH7IDlkNURYl5QlAn4Wi8nWUDmkbgIgNoCBYm4KN6G8 /HeZssVEKo00XzzQQp7GZOBQfUcAh/n5D7Gx/3qCDZ477UmV6QvN3otp8wmOhxghA6 pomcth5B94lAw== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 4453B6A061; Mon, 16 Mar 2026 09:48:35 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Mon, 16 Mar 2026 09:47:12 -0600 Message-ID: <20260316154733.1587261-8-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260316154733.1587261-1-sjg@u-boot.org> References: <20260316154733.1587261-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: MNKQ7KUEGVVMLXPS64HAIQSAJJMLR5F3 X-Message-ID-Hash: MNKQ7KUEGVVMLXPS64HAIQSAJJMLR5F3 X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Simon Glass X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 07/20] buildman: Add thread_class param to Builder List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Simon Glass The distributed-build worker needs a custom BuilderThread subclass that sends results over SSH instead of writing to disk. Add a thread_class parameter to Builder.__init__() so the caller can override the thread class used in _setup_threads() The default is builderthread.BuilderThread Signed-off-by: Simon Glass --- tools/buildman/builder.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/tools/buildman/builder.py b/tools/buildman/builder.py index f704cc86943..f64331d0fb1 100644 --- a/tools/buildman/builder.py +++ b/tools/buildman/builder.py @@ -230,7 +230,8 @@ class Builder: force_build_failures=False, kconfig_check=True, force_reconfig=False, in_tree=False, force_config_on_failure=False, make_func=None, - dtc_skip=False, build_target=None): + dtc_skip=False, build_target=None, + thread_class=builderthread.BuilderThread): """Create a new Builder object Args: @@ -284,6 +285,10 @@ class Builder: make_func (function): Function to call to run 'make' dtc_skip (bool): True to skip building dtc and use the system one build_target (str): Build target to use (None to use the default) + thread_class (type): BuilderThread subclass to use (default + builderthread.BuilderThread). This allows the caller to + override how results are processed, e.g. sending over SSH + instead of writing to disk. """ self.toolchains = toolchains self.base_dir = base_dir @@ -367,6 +372,7 @@ class Builder: # Note: baseline state for result summaries is now in ResultHandler + self._thread_class = thread_class self._setup_threads(mrproper, per_board_out_dir, test_thread_exceptions) ignore_lines = ['(make.*Waiting for unfinished)', @@ -392,7 +398,7 @@ class Builder: self.queue = queue.Queue() self.out_queue = queue.Queue() for i in range(self._num_threads): - t = builderthread.BuilderThread( + t = self._thread_class( self, i, mrproper, per_board_out_dir, test_exception=test_thread_exceptions) t.daemon = True @@ -404,7 +410,7 @@ class Builder: t.start() self._threads.append(t) else: - self._single_builder = builderthread.BuilderThread( + self._single_builder = self._thread_class( self, -1, mrproper, per_board_out_dir) def __del__(self):