From patchwork Sun Jul 7 05:28:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Atharva Lele X-Patchwork-Id: 1128558 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.133; helo=hemlock.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="DYQGBs6f"; dkim-atps=neutral Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 45hHFm15SDz9s8m for ; Sun, 7 Jul 2019 15:29:31 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 5243987100; Sun, 7 Jul 2019 05:29:28 +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 AxBbBDKjuR5v; Sun, 7 Jul 2019 05:29:27 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id C36D687082; Sun, 7 Jul 2019 05:29:27 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 398E41BF5DD for ; Sun, 7 Jul 2019 05:29:27 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 321B185535 for ; Sun, 7 Jul 2019 05:29:27 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id L8WlmUFB_fdh for ; Sun, 7 Jul 2019 05:29:25 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pl1-f196.google.com (mail-pl1-f196.google.com [209.85.214.196]) by fraxinus.osuosl.org (Postfix) with ESMTPS id D602E84506 for ; Sun, 7 Jul 2019 05:29:25 +0000 (UTC) Received: by mail-pl1-f196.google.com with SMTP id 9so6532583ple.5 for ; Sat, 06 Jul 2019 22:29:25 -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=vFEF8xNwPY/nI4pGo1F9VQO3SGe4ZjXobS9tnyaybLM=; b=DYQGBs6f2m7owLTjA2mmtefu0gHf3UikkzQJmJZvtSSUJ1H1L5LCFIBTTb17+QxgrH rSHnTOrDB+OYasy+RV31upmUAU3MRCMQdIFUUtEadw9VAl8lvRflkgVsKpXXeH/JpjUK bbpBLLtWpLWIoj/Z2ESo+vU6n2cbWPZXgg1B9YinPaqbZ3U8Zlh8wYNlIRhz1tPdEpnP 1We7D/tmprS54awDeGx4dwIFgpegtuYKSFlSkKbAZxSXcgBY2yO1YSNGzotfpMYtuW9W 3AHYQDcA9jqnXVLgUh4wDf4WdSs18EKolFPdgpaQMtBzlkA5l6JZvx7TbXXKrvyvqak5 1jWA== 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=vFEF8xNwPY/nI4pGo1F9VQO3SGe4ZjXobS9tnyaybLM=; b=j9zM7REELKpATLt7OhH7tt2U+AMG/52NdzAp3vYG0zbr/VV7J+ota6aYWBuBlvr/uL PfMytFCzlXenvyyU8uiYKY+rmnIMJNZPPrMYjfQ3CPubG33MVjVrLLrt/5RXUjtbPo9Z BrNlT+q5BMrLrdA3Vu1IusH/L9PzOJ9hZcACQ//29tovhts0IkY6v/isHPkHfjLtmPP8 0Xvr0drNGQPhyctWDQLCh/yR91MguqbKyOOw1XKoWtJCA3ZmTQUeMU8TbzF9PRlsKmLy U8ctJKkSl+DAIurIxGe3JgAp0uNvIAgbxP6nkmo7wd4jApG+yeU31Bfsi5aJEu9LAv8u a2xg== X-Gm-Message-State: APjAAAVA3mtYxdT8q3WXf3wgmuEZp3x+wj3jK0d9LNXKqkWpFaOirIfk d6VR6vrC2rDpKYVzeuHxawYlm7io5EJxaA== X-Google-Smtp-Source: APXvYqx4uMjkZiHiMVS73aVBV/l4UyuvAOu2v255fwtBeC+vNYUVWPf5zRyMv1gb38/QdXNTo0Oi9w== X-Received: by 2002:a17:902:9a06:: with SMTP id v6mr14674643plp.71.1562477365099; Sat, 06 Jul 2019 22:29:25 -0700 (PDT) Received: from localhost.localdomain ([123.201.194.71]) by smtp.gmail.com with ESMTPSA id j24sm18039214pgg.86.2019.07.06.22.29.23 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sat, 06 Jul 2019 22:29:24 -0700 (PDT) From: Atharva Lele To: buildroot@buildroot.org Date: Sun, 7 Jul 2019 10:58:13 +0530 Message-Id: <20190707052831.9469-13-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 13/31] autobuild-run: move debug 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 | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/scripts/autobuild-run b/scripts/autobuild-run index 05de063..923652c 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, buildpid): + repo, upload, buildpid, debug): self.instance = instance self.njobs = njobs self.sysinfo = sysinfo @@ -288,6 +288,7 @@ class Builder: self.repo = repo self.upload = upload self.buildpid = buildpid + self.debug = debug def prepare_build(self, **kwargs): """Prepare for the next build of the specified instance @@ -378,7 +379,7 @@ class Builder: log_write(log, "INFO: generate the configuration") - if kwargs['debug']: + if self.debug: devnull = log else: devnull = open(os.devnull, "w") @@ -724,7 +725,7 @@ class Builder: if not os.path.exists(idir): os.mkdir(idir) - if kwargs['debug']: + if self.debug: kwargs['log'] = sys.stdout else: kwargs['log'] = open(os.path.join(idir, "instance.log"), "a+") @@ -870,10 +871,9 @@ def main(): toolchains_csv = args['--toolchains-csv'], repo = args['--repo'], upload = upload, - buildpid = buildpid) - p = multiprocessing.Process(target=builder.run_instance, kwargs=dict( - debug = args['--debug'] - )) + buildpid = buildpid, + debug = args['--debug']) + p = multiprocessing.Process(target=builder.run_instance) p.start() processes.append(p)