From patchwork Sun Jul 7 05:28:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Atharva Lele X-Patchwork-Id: 1128560 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.138; helo=whitealder.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="aywlNyBT"; dkim-atps=neutral Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 45hHFm2jmYz9sN4 for ; Sun, 7 Jul 2019 15:29:32 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id B25A785D26; Sun, 7 Jul 2019 05:29:30 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id BnZCGtqmo-B1; Sun, 7 Jul 2019 05:29:26 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 2D7B085FEF; Sun, 7 Jul 2019 05:29:26 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 360C01BF5DD for ; Sun, 7 Jul 2019 05:29:24 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 3110F85F6D for ; Sun, 7 Jul 2019 05:29:24 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id oIUVAyhWgM+s for ; Sun, 7 Jul 2019 05:29:23 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pg1-f193.google.com (mail-pg1-f193.google.com [209.85.215.193]) by whitealder.osuosl.org (Postfix) with ESMTPS id A76E285CA1 for ; Sun, 7 Jul 2019 05:29:23 +0000 (UTC) Received: by mail-pg1-f193.google.com with SMTP id p10so6035319pgn.1 for ; Sat, 06 Jul 2019 22:29:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=MHod2FHMLaBwSOLqciL+ZW/QXgkguLYbMOvAlz5xHWE=; b=aywlNyBTSlcTU0WF0g8mxA5fMapikZIG5Dsy8ThWMdwxe5yf3TRCBvrSVZg1OxmE4V jNd5xjL9beegWFA5vWhBPoXzAquWzsJBaczLOPe/DuAYD29XPRSbWhXyHboIkUNCsl9f c0N49LEvn+omn7zD/IpJC5zZ41egbdGlG1t72eSkgwYKA25xl787zFDxSul3zFUropw+ k2cb2FQMV0QmBsuG9RH2R5dAGTt+qInbzEdFtyqJrKJGdcmvk2K/yNAkY/DPgMarRHwp UAH6OSoFbVo73VpIBj4zDCQnQ9eDYT8C6I1XBGirHcyTv0dBBLA2W1N+6MvGoaG8VweX m3uQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=MHod2FHMLaBwSOLqciL+ZW/QXgkguLYbMOvAlz5xHWE=; b=CyYu74yq0TDtYpXuCI3A8sQH2ILpRFhcydp0USDwkZqm5ZDKyVBDfUXecg4kFAIkpB 5jOjbbW2K3HrKzL30yBCqw+j8MpPSyd6Mnw7RKG+7SLfzgOQ7NchmZk6/9kjDnTwwegV dY87Fcw12zYT1tgQ1UrA9qjUIy8Pg0o56JfDVDBuu7GSHNeOKUF+FZOXDOEnYg6pwCM+ qBji1YB+c+RLoY8Pay0D8gfBKrBx4o1am0KwfB9sVETBGbY4ISIMCMa6pGeGKn+B5f4Q XS33MvoKzHNGXxKXVxKSR19t+ic3a5r0ZSvDQvik6+IyfsmShzVVJaikdZMbdIrhasiV ggaA== X-Gm-Message-State: APjAAAVP+GDfdIi0jY/W2rjSs+XSCGk359uqNAkKtmrOFBybpC6m/WpB etfRrkr8JiTmGYp+8H8pvVUcpbuYtVXpIw== X-Google-Smtp-Source: APXvYqyRnUsbL0ITma9J0olA8DtWwzd8mQ5IQ7rU88Zk/A2qwjOE68H4TqVjSMaqEC/07g0zGPOpkQ== X-Received: by 2002:a63:fd0d:: with SMTP id d13mr14840566pgh.423.1562477362724; Sat, 06 Jul 2019 22:29:22 -0700 (PDT) Received: from localhost.localdomain ([123.201.194.71]) by smtp.gmail.com with ESMTPSA id j24sm18039214pgg.86.2019.07.06.22.29.20 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sat, 06 Jul 2019 22:29:22 -0700 (PDT) From: Atharva Lele To: buildroot@buildroot.org Date: Sun, 7 Jul 2019 10:58:12 +0530 Message-Id: <20190707052831.9469-12-itsatharva@gmail.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190707052831.9469-1-itsatharva@gmail.com> References: <20190707052831.9469-1-itsatharva@gmail.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH v3 12/31] autobuild-run: move buildpid from kwargs to Builder class X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Atharva Lele , yann.morin.1998@free.fr, thomas.petazzoni@bootlin.com Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Signed-off-by: Atharva Lele Acked-by: Arnout Vandecappelle (Essensium/Mind) --- Changes v1 -> v2: - Explicitly state class constructor argument --- scripts/autobuild-run | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/scripts/autobuild-run b/scripts/autobuild-run index e217117..05de063 100755 --- a/scripts/autobuild-run +++ b/scripts/autobuild-run @@ -274,7 +274,7 @@ class Builder: def __init__(self, instance, njobs, sysinfo, http_url, http_login, http_password, submitter, make_opts, nice, toolchains_csv, - repo, upload): + repo, upload, buildpid): self.instance = instance self.njobs = njobs self.sysinfo = sysinfo @@ -287,6 +287,7 @@ class Builder: self.toolchains_csv = toolchains_csv self.repo = repo self.upload = upload + self.buildpid = buildpid def prepare_build(self, **kwargs): """Prepare for the next build of the specified instance @@ -482,9 +483,9 @@ class Builder: build_monitor.daemon = True build_monitor.start() - kwargs['buildpid'][self.instance] = sub.pid + self.buildpid[self.instance] = sub.pid ret = sub.wait() - kwargs['buildpid'][self.instance] = 0 + self.buildpid[self.instance] = 0 # If build failed, monitor thread would have exited at this point if monitor_thread_hung_build_flag.is_set(): @@ -868,9 +869,9 @@ def main(): nice = (args['--nice'] or 0), toolchains_csv = args['--toolchains-csv'], repo = args['--repo'], - upload = upload) + upload = upload, + buildpid = buildpid) p = multiprocessing.Process(target=builder.run_instance, kwargs=dict( - buildpid = buildpid, debug = args['--debug'] )) p.start()