From patchwork Sun Jul 7 05:28:03 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Atharva Lele X-Patchwork-Id: 1128551 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="iFzh3LKo"; 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 45hHFS0xDBz9sCJ for ; Sun, 7 Jul 2019 15:29:14 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id BB44685BCC; Sun, 7 Jul 2019 05:29:10 +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 9PJ0XklzqkAx; Sun, 7 Jul 2019 05:29:05 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 2DF2785BBD; Sun, 7 Jul 2019 05:29:05 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 7A28D1BF5DD for ; Sun, 7 Jul 2019 05:29:03 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 72B4920422 for ; Sun, 7 Jul 2019 05:29:03 +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 uG9jj1VvL4wx for ; Sun, 7 Jul 2019 05:29:02 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pl1-f195.google.com (mail-pl1-f195.google.com [209.85.214.195]) by silver.osuosl.org (Postfix) with ESMTPS id E06B320414 for ; Sun, 7 Jul 2019 05:29:01 +0000 (UTC) Received: by mail-pl1-f195.google.com with SMTP id c14so6523884plo.0 for ; Sat, 06 Jul 2019 22:29:01 -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=prAlPHMoWWUegR1oxXvixZESE5Qm3UdiM9wp5LmpHZE=; b=iFzh3LKoTrvHoBRnJbLJcnwmtPzpIZDjhkGEc3Ksy/9dgA9kQ8+fO/op5vAefhDiEW m4WcQd9eO6vU//lx8wLEfkj6Vu1bCWenO422NUDA+MrzanU1oV6haT0TTI+YvSDvJOdh kFx/yuhHvKUake8V46/UgJPmBBIyDetd19zHYuZXWbjGxD6LPH4TslShFAjfS8WgDN/N Y11SalAervj+WaD1vqxFCOZIqMht3cFkobrJtyY5ZsiHfOyOmXYdXaYFdqS1W81KpmHJ fpfS+qiTB1wXdzQgmqmMZWdhDNgP/qfVrz5xLEKaN3lDYxnFoMVZrOcyoKPYVdmdQnqW UN8Q== 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=prAlPHMoWWUegR1oxXvixZESE5Qm3UdiM9wp5LmpHZE=; b=tYtftwl7c6LhlW8foo3ETUdPqf5uJPUiYj7EV56zDeohTWdKOLqykrehbzi04/PC+B X3VHMrfwBpmhSY1vEgItGnlcfKkmQLoMdOT36/tsnNKSRlEVXuveVMZyHViz3uyjWfyl +rATNm/IyfghcM7i1Nv1VWMGJ3wytGt2VU8YGOvvRwmvqfBHNxYvIxjKixudtHR5eGNc WEbJPETXgUdHicl6f/8e9dA0M/FzOTQIUYIM7A2o55how5fxwv93FB3QLL9SGx50BlBO ADWniusuFNPEkSmUPYpoA23gUTcDyZMXlSejamFMUHJ2Bw+rXl5l7WDOBqBrqOHR4uu4 eBxg== X-Gm-Message-State: APjAAAWqPhF8lq82kToJ+ZGrtBwxPpbFN/h2M6iJR/JhKgRcjo6tj0vL nb37R9pepTSuNKJttrc5L8ab85ZXde7vkA== X-Google-Smtp-Source: APXvYqxq9H0VNPVOZOOYaXUVUzDZSnVjz0V+mIwHNt9LJWW+t0fZORlIcRvM5VYfSoLAMB2rViSYCw== X-Received: by 2002:a17:902:f095:: with SMTP id go21mr15333645plb.58.1562477340934; Sat, 06 Jul 2019 22:29:00 -0700 (PDT) Received: from localhost.localdomain ([123.201.194.71]) by smtp.gmail.com with ESMTPSA id j24sm18039214pgg.86.2019.07.06.22.28.58 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sat, 06 Jul 2019 22:29:00 -0700 (PDT) From: Atharva Lele To: buildroot@buildroot.org Date: Sun, 7 Jul 2019 10:58:03 +0530 Message-Id: <20190707052831.9469-3-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 03/31] autobuild-run: move njobs 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 | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/scripts/autobuild-run b/scripts/autobuild-run index 9946ddc..4d730ce 100755 --- a/scripts/autobuild-run +++ b/scripts/autobuild-run @@ -271,8 +271,9 @@ class SystemInfo: return not missing_requirements class Builder: - def __init__(self, instance): + def __init__(self, instance, njobs): self.instance = instance + self.njobs = njobs def prepare_build(self, **kwargs): """Prepare for the next build of the specified instance @@ -455,7 +456,7 @@ class Builder: cmd = ["nice", "-n", str(nice), "make", "O=%s" % outputdir, "-C", srcdir, "BR2_DL_DIR=%s" % dldir, - "BR2_JLEVEL=%s" % kwargs['njobs']] \ + "BR2_JLEVEL=%s" % self.njobs] \ + kwargs['make_opts'].split() sub = subprocess.Popen(cmd, stdout=f, stderr=f) @@ -843,9 +844,10 @@ def main(): buildpid = multiprocessing.Array('i', int(args['--ninstances'])) processes = [] for i in range(0, int(args['--ninstances'])): - builder = Builder(instance = i) + builder = Builder( + instance = i, + njobs = args['--njobs']) p = multiprocessing.Process(target=builder.run_instance, kwargs=dict( - njobs = args['--njobs'], sysinfo = sysinfo, http_url = args['--http-url'], http_login = args['--http-login'],