From patchwork Sun Jul 7 05:28:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Atharva Lele X-Patchwork-Id: 1128561 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="lnqXcAu9"; 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 45hHFm6Kmvz9sNj for ; Sun, 7 Jul 2019 15:29:32 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id E2B15204AE; Sun, 7 Jul 2019 05:29:30 +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 BU1k9ND8y3ju; Sun, 7 Jul 2019 05:29:22 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 3028B204DE; Sun, 7 Jul 2019 05:29:16 +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 3D7B21BF5DD for ; Sun, 7 Jul 2019 05:29:14 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 3B1F3870DF for ; Sun, 7 Jul 2019 05:29:14 +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 DJ-fcoGrvXJZ for ; Sun, 7 Jul 2019 05:29:13 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pg1-f194.google.com (mail-pg1-f194.google.com [209.85.215.194]) by hemlock.osuosl.org (Postfix) with ESMTPS id A79388702D for ; Sun, 7 Jul 2019 05:29:13 +0000 (UTC) Received: by mail-pg1-f194.google.com with SMTP id s27so6034880pgl.2 for ; Sat, 06 Jul 2019 22:29:13 -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=lnqXcAu937ouE0+4VhvvmYZ3HQuCl0b47AFWz77OL7nDBfKnINu7cRmunYzYp9o/Xj DSu8QzCMj2BFH4qwtqYZMqnrOvi3dmVupbZ10zvUxD0uq1dFdhHkkU8f4Isev80QU1ek JtLfvG+TfYlO8X9ELvvlLThpVz7CJ66rYuDeTuw1RvycoFMARtOVwsGmgHrS7PBOT4J6 7yrNGEUuGqX2Q+by+HGmV33CoQ4ICpEVemSzZrDK/ngvyEOEtKvWFa8+0vrrAM4Jr2/5 ueNk88FLmm1b411sii/VIiPY2xZwUP+ySf6mAfKT8EA7GjUFN4TgTDfeMkbqfIpguXNS Chzg== 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=aKr1aJ3P1naK0f6gd4mLeuoNHW8jtCHrJDBJR+Y3hVVld7Cv+MjFoFDIWIpRj+k2pR 32Hc6rmYrq+qesEaQSRD3bATtu8WAeiEyBNH7EmKRSKnbWFGQv2VRzUmCa2Ct0ViXhFp 4Kn/RLGnw9zOV4CnGxszdrcCktlWiTl/aOJ/f/Wz9SYZjE/146FifFcsEJWsP7gOsL8T scelOlAqwTTnSNW6Q7AoMRPR31Gb/wDLKuvKr96nWQnaGaqgS1vGeAq5fUG186/tajwL v37areuvFI4uYYmGp5uSeHNX9L1sw2mWVpikiqd872DZyKlUP+SztbfEDmyFJcUd5c4t BKrA== X-Gm-Message-State: APjAAAV/FROWPyW7sKhUQASpPuYU8G11YjAT2NFG7SKYLl3TfKREMNyI 9JRXGdMp7Gzyk3JWxp06QEnKcBBBocGOww== X-Google-Smtp-Source: APXvYqysSSnl8S5mLJdf0g3AK0KTMjUo+lJTPykOSFDm+OQDtwp4HFuoBgeaJCq62kcsuHv7sAJNMg== X-Received: by 2002:a17:90a:cb87:: with SMTP id a7mr15840615pju.130.1562477352886; Sat, 06 Jul 2019 22:29:12 -0700 (PDT) Received: from localhost.localdomain ([123.201.194.71]) by smtp.gmail.com with ESMTPSA id j24sm18039214pgg.86.2019.07.06.22.29.10 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sat, 06 Jul 2019 22:29:12 -0700 (PDT) From: Atharva Lele To: buildroot@buildroot.org Date: Sun, 7 Jul 2019 10:58:08 +0530 Message-Id: <20190707052831.9469-8-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 08/31] 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,