From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 77D8B38582A5 for ; Mon, 11 Mar 2024 19:03:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 77D8B38582A5 Authentication-Results: sourceware.org; dmarc=fail (p=none dis=none) header.from=efficios.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=efficios.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 77D8B38582A5 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=158.69.221.121 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1710183829; cv=none; b=wH1nufigGDVYw4dtMJxZvCCI1YgUg98EvZobNKXPdT/2EQ4eqUdH4XMlbbr6uIf+SebxldRztpW6JF7Ij6y1FVBCvfrwzCS3rY5ozR1oedXGPa+u1Pvk1Csanva8QbmUd3vLc3LxpZD1RLqM9FwotZe3yYgsZUAvwT/n2bKdtpc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1710183829; c=relaxed/simple; bh=dyvd6/3vzN02ww1UmLRj2npdAQkCKhLZF8MO6yxLC6s=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=AZ4ACo9BVZRmhMClFzundEqm9Va0zAz3RK5LOJnON/f+PApUxdUQ2yBfHDpFMxDdIKTkc43WmKeUnymQthBk37vNDm1VgvDUKxlEa3dGw81d6/YB7ARCbN82ranyubrTw/dPo2VogCijd8HsnyfIfLxuLcG86hNhiUV4M+TUHrg= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from smarchi-efficios.internal.efficios.com (192-222-143-198.qc.cable.ebox.net [192.222.143.198]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id A4BDB1E0FE; Mon, 11 Mar 2024 15:03:44 -0400 (EDT) From: Simon Marchi To: buildbot@sourceware.org Cc: Simon Marchi Subject: [PATCH 7/8] autoregen.py: let subprocesses print to stdout/stderr Date: Mon, 11 Mar 2024 15:01:19 -0400 Message-ID: <20240311190341.235331-8-simon.marchi@efficios.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240311190341.235331-1-simon.marchi@efficios.com> References: <20240311190341.235331-1-simon.marchi@efficios.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3496.4 required=5.0 tests=BAYES_00,GIT_PATCH_0,KAM_DMARC_NONE,KAM_DMARC_STATUS,SPF_HELO_PASS,SPF_SOFTFAIL,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Use `subprocess.run` with `stdout=sys.stdout` and `stderr=sys.stderr`, such that subprocesses print to the job's stdout and stderr directly. This is not expected to cause any change, as the current commands don't output anything. But if they do, I think it's useful to have that output in the buildbot's logs. --- builder/containers/autoregen.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/builder/containers/autoregen.py b/builder/containers/autoregen.py index ff6939b66105..437f0dabe2de 100755 --- a/builder/containers/autoregen.py +++ b/builder/containers/autoregen.py @@ -4,6 +4,7 @@ import os import shutil import subprocess from pathlib import Path +import sys # On Gentoo, vanilla unpatched autotools are packaged separately. @@ -47,7 +48,14 @@ SKIP_DIRS = [ def run_shell(cmd: str): cmd = f"{ENV} {cmd}" print(f"+ {cmd}") - subprocess.check_output(f"{ENV} {cmd}", shell=True, encoding="utf8") + res = subprocess.run( + f"{ENV} {cmd}", + shell=True, + encoding="utf8", + stdout=sys.stdout, + stderr=sys.stderr, + ) + res.check_returncode() config_folders: list[Path] = [] -- 2.44.0