From patchwork Thu Aug 1 02:46:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Atharva Lele X-Patchwork-Id: 1140206 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.136; helo=silver.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="Y8L1o/Wb"; dkim-atps=neutral Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 45zZT32Lf8z9sMr for ; Thu, 1 Aug 2019 12:47:18 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id E2CDA22699; Thu, 1 Aug 2019 02:47:15 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ib-UufGAWrtN; Thu, 1 Aug 2019 02:47:14 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id E6E7D2266C; Thu, 1 Aug 2019 02:47:13 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 4B54B1BF59D for ; Thu, 1 Aug 2019 02:47:12 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 463A587E4D for ; Thu, 1 Aug 2019 02:47:12 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id e1-NDC2TO4jj for ; Thu, 1 Aug 2019 02:47:11 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pf1-f193.google.com (mail-pf1-f193.google.com [209.85.210.193]) by hemlock.osuosl.org (Postfix) with ESMTPS id D2EDB87E58 for ; Thu, 1 Aug 2019 02:47:11 +0000 (UTC) Received: by mail-pf1-f193.google.com with SMTP id m30so33053256pff.8 for ; Wed, 31 Jul 2019 19:47:11 -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=TDaMfyGks+XpP3BmK5qQOdRgXsusVv8Th6xg2XSN6jk=; b=Y8L1o/Wb/AjzKkfEyAyJAk/EPMEXnQRvN0Go7rom9TGWxMi9uIXGG/hCQRzELeb//N 1wETOJDBx+ET6O677ZZpkfYM41Z+ciq3FfN6OB2T38OT+6OukLT5QWgY68BP2F5EkyHB ZGkBH/U1yWCYvwznmZF47Jij+3Ka3hSJc0eLlIz0f8yStxsDrVQj582Hb2uecMlVEq9i jJ+fXp8mKkv7qR40TZJP0VdrrJP0ptwpoYjYSV08WSWphYQA8cl5CFWeQL4MPvJm0XzR 3olwbgDe8ptJmy1PWQfRk3KJMD5nwGs1pxXcflNooZUk5jkqxCYNhUKNYPjCJpqcw0Iv y2NA== 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=TDaMfyGks+XpP3BmK5qQOdRgXsusVv8Th6xg2XSN6jk=; b=C6jo8lN5toYs58UsINpbodiWU7bUh+4n8PPIssj1bj7r2mDa7kXRzaNC5q4tWg1/R4 CpA/E2lJ/90tSYOMskDMncXv7KKN5A2CarAg+1CFYxoMsPo/Y2mIwFwFsQ5injhhcItf wTTwMbH7Ry6wwNZMa/RLCdZOa/OfM4a7fbsu9cSAVZgoSGH5WWAMxLDGf3QYrtbZIQ/z EJFPhJWg7fVpeerla9+ZDZlR/Uy2jRPHAXvYmbdQFE2keqpWxTssJx3X9UCY4XoqHIh7 XK9t9himQggHscDASa/002v60BuLFklftJwUsN2Vpu/1EbJshgGj+dKMqCehnRdPKMpG nS6Q== X-Gm-Message-State: APjAAAVLo9wqwGg6m2jwLpUxx+mZnWTmhlhLfU4JmMhmCCinKMj7Qt+h p4vuTnQlH4tydpzrf+zyLc3jAyZ2JL8= X-Google-Smtp-Source: APXvYqwVCds23X9JQ7ykTF8o45823y5EZJSIXbKW3dZLx8OlfB4/ylOTY7xO6+lJ4O/TIoVfGQ4F5w== X-Received: by 2002:a63:7d05:: with SMTP id y5mr118081952pgc.425.1564627630985; Wed, 31 Jul 2019 19:47:10 -0700 (PDT) Received: from localhost.localdomain ([123.201.36.76]) by smtp.gmail.com with ESMTPSA id 185sm79857669pfa.170.2019.07.31.19.47.08 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 31 Jul 2019 19:47:10 -0700 (PDT) From: Atharva Lele To: buildroot@buildroot.org Date: Thu, 1 Aug 2019 08:16:21 +0530 Message-Id: <20190801024643.11024-9-itsatharva@gmail.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190801024643.11024-1-itsatharva@gmail.com> References: <20190801024643.11024-1-itsatharva@gmail.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH v4 08/30] autobuild-run: move niceness 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 - Fix accidentally moving make_opts in the same patch --- scripts/autobuild-run | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/autobuild-run b/scripts/autobuild-run index c2d137c..87d0bd8 100755 --- a/scripts/autobuild-run +++ b/scripts/autobuild-run @@ -273,7 +273,7 @@ class SystemInfo: class Builder: def __init__(self, instance, njobs, sysinfo, http_url, http_login, http_password, - submitter, make_opts): + submitter, make_opts, nice): self.instance = instance self.njobs = njobs self.sysinfo = sysinfo @@ -282,6 +282,7 @@ class Builder: self.http_password = http_password self.submitter = submitter self.make_opts = make_opts + self.nice = nice def prepare_build(self, **kwargs): """Prepare for the next build of the specified instance @@ -449,7 +450,6 @@ class Builder: idir = "instance-%d" % self.instance log = kwargs['log'] - nice = kwargs['nice'] # We need the absolute path to use with O=, because the relative # path to the output directory here is not relative to the @@ -461,7 +461,7 @@ class Builder: f = open(os.path.join(outputdir, "logfile"), "w+") log_write(log, "INFO: build started") - cmd = ["nice", "-n", str(nice), + cmd = ["nice", "-n", str(self.nice), "make", "O=%s" % outputdir, "-C", srcdir, "BR2_DL_DIR=%s" % dldir, "BR2_JLEVEL=%s" % self.njobs] \ @@ -860,9 +860,9 @@ def main(): http_login = args['--http-login'], http_password = args['--http-password'], submitter = args['--submitter'], - make_opts = (args['--make-opts'] or '')) + make_opts = (args['--make-opts'] or ''), + nice = (args['--nice'] or 0)) p = multiprocessing.Process(target=builder.run_instance, kwargs=dict( - nice = (args['--nice'] or 0), toolchains_csv = args['--toolchains-csv'], repo = args['--repo'], upload = upload,