From patchwork Sun Jul 7 05:28:16 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Atharva Lele X-Patchwork-Id: 1128564 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="c6sRrYEm"; 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 45hHFz6KSBz9s8m for ; Sun, 7 Jul 2019 15:29:43 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 5C58086004; Sun, 7 Jul 2019 05:29:42 +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 X-j+TF-AbQbS; Sun, 7 Jul 2019 05:29:37 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id C490E85CA1; Sun, 7 Jul 2019 05:29:37 +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 8D4371BF5DD for ; Sun, 7 Jul 2019 05:29:33 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 8140884506 for ; Sun, 7 Jul 2019 05:29:33 +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 IUn6jAl9GDNj for ; Sun, 7 Jul 2019 05:29:32 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pg1-f196.google.com (mail-pg1-f196.google.com [209.85.215.196]) by fraxinus.osuosl.org (Postfix) with ESMTPS id E770E854FC for ; Sun, 7 Jul 2019 05:29:32 +0000 (UTC) Received: by mail-pg1-f196.google.com with SMTP id l21so2023926pgm.3 for ; Sat, 06 Jul 2019 22:29:32 -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=Pm3yZoBcuycz57fAm4ovvVjemf6JsU9dWM0c92PGE/0=; b=c6sRrYEmh4ZSYZwTChC+dCaod14SXn0JUPDsiUIFQKLLKg+qbntTW+VQKNafnTjMjD tUppv+dBUJrTccuP7PKEhwEFkbIyx4e8Or/p3yZr88iWJVLRegCMDDIeNoHFI/Uk9pmt Y/GNEXYKhr50JFRxharfTk/zis0HS8S8J3zhwxs3SDtlSCecCUBNAVpEs1VMvA+1QUlc +f4xfZgS9eQ2UYEoS+s68R/9WiF43J16v+Gy2GMuAGyVZXbbeOhZKj74olduND4joO5c y8tZHI9QEj5EZjEpmkVGQojydMq1OT3Psp7x6EECvGNgTWo23SqzUhJv44MSGfRqvnPM Jm2Q== 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=Pm3yZoBcuycz57fAm4ovvVjemf6JsU9dWM0c92PGE/0=; b=Na2sdIaiXFK/GDqXwfaDdfK6uT+PTrRKWQ15jo+C1GMmLljyrBXz/z4Ao/hLshUMcJ Y5p3stKtWv0H8LReYBGpbmOGcJRS+QE1zGJXe3EzR5UPIAN9KTN5pODvET+QjYMEHBTP LbqfPWURwg0vpO0HV3qR53WbnGbrIclx8m5JchlGi27/+h/NvwyysYcGRzlE5eRAJdTX GuFFVRx4SB3VbC8orsYwMKomSPuzpxYSG2WmLnS6zICN26TWsqL/3xBxz6X/zQDkxa7W iWbd1EGTwYScm0Visy94jiYYUYn3cro5VCBggGlbAku8iGqTa5XxM3wUDQW+kuOHdH3A cPig== X-Gm-Message-State: APjAAAVLG3AsJZRzSBPQIBUwPP9yhJuef6lsFjHurbfOE1YiQegzwaZV bb2AYfI2/16DC+DJlRzwQRV65yzNSmAsgg== X-Google-Smtp-Source: APXvYqy7vnb5gzIwV0lIAOWZQ/Y4yoAB2VdbMAZ9HAFjam9xKIZG/lnwZtteICV5sZNe7HTNAFDMuw== X-Received: by 2002:a17:90a:8a91:: with SMTP id x17mr15400586pjn.95.1562477372108; Sat, 06 Jul 2019 22:29:32 -0700 (PDT) Received: from localhost.localdomain ([123.201.194.71]) by smtp.gmail.com with ESMTPSA id j24sm18039214pgg.86.2019.07.06.22.29.30 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sat, 06 Jul 2019 22:29:31 -0700 (PDT) From: Atharva Lele To: buildroot@buildroot.org Date: Sun, 7 Jul 2019 10:58:16 +0530 Message-Id: <20190707052831.9469-16-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 16/31] autobuild-run: remove kwargs argument from function calls and definitions 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) --- scripts/autobuild-run | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/scripts/autobuild-run b/scripts/autobuild-run index cb00745..adc8795 100755 --- a/scripts/autobuild-run +++ b/scripts/autobuild-run @@ -298,7 +298,7 @@ class Builder: else: self.log = open(os.path.join(self.idir, "instance.log"), "a+") - def prepare_build(self, **kwargs): + def prepare_build(self): """Prepare for the next build of the specified instance This function prepares the build by making sure all the needed @@ -375,7 +375,7 @@ class Builder: return 0 - def gen_config(self, **kwargs): + def gen_config(self): """Generate a new random configuration.""" outputdir = os.path.abspath(os.path.join(self.idir, "output")) srcdir = os.path.join(self.idir, "buildroot") @@ -417,7 +417,7 @@ class Builder: break monitor_thread_stop_flag.wait(30) - def check_reproducibility(self, **kwargs): + def check_reproducibility(self): """Check reproducibility of builds Use diffoscope on the built images, if diffoscope is not @@ -452,7 +452,7 @@ class Builder: log_write(self.log, "INFO: Build is reproducible!") return 0 - def do_build(self, **kwargs): + def do_build(self): """Run the build itself""" # We need the absolute path to use with O=, because the relative @@ -509,7 +509,7 @@ class Builder: log_write(self.log, "INFO: build successful") return 0 - def do_reproducible_build(self, **kwargs): + def do_reproducible_build(self): """Run the builds for reproducibility testing Build twice with the same configuration. Calls do_build() to @@ -521,7 +521,7 @@ class Builder: # Start the first build log_write(self.log, "INFO: Reproducible Build Test, starting build 1") - ret = self.do_build(**kwargs) + ret = self.do_build() if ret != 0: log_write(self.log, "INFO: build 1 failed, skipping build 2") return ret @@ -535,16 +535,16 @@ class Builder: # Start the second build log_write(self.log, "INFO: Reproducible Build Test, starting build 2") - ret = self.do_build(**kwargs) + ret = self.do_build() if ret != 0: log_write(self.log, "INFO: build 2 failed") return ret # Assuming both have built successfully - ret = self.check_reproducibility(**kwargs) + ret = self.check_reproducibility() return ret - def send_results(self, result, **kwargs): + def send_results(self, result): """Prepare and store/send tarball with results This function prepares the tarball with the results, and either @@ -705,7 +705,7 @@ class Builder: os.rename(os.path.join(outputdir, "results.tar.bz2"), resultfilename) log_write(self.log, "INFO: results saved as %s" % resultfilename) - def run_instance(self, **kwargs): + def run_instance(self): """Main per-instance loop Prepare the build, generate a configuration, run the build, and submit the @@ -721,14 +721,14 @@ class Builder: while True: check_version() - ret = self.prepare_build(**kwargs) + ret = self.prepare_build() if ret != 0: continue resultdir = os.path.join(self.idir, "output", "results") os.mkdir(resultdir) - ret = self.gen_config(**kwargs) + ret = self.gen_config() if ret != 0: log_write(self.log, "WARN: failed to generate configuration") continue @@ -738,11 +738,11 @@ class Builder: with open(os.path.join(outputdir, ".config"), "r") as fconf: reproducible = "BR2_REPRODUCIBLE=y\n" in fconf.read() if reproducible: - ret = self.do_reproducible_build(**kwargs) + ret = self.do_reproducible_build() else: - ret = self.do_build(**kwargs) + ret = self.do_build() - self.send_results(ret, **kwargs) + self.send_results(ret) # args / config file merging inspired by: # https://github.com/docopt/docopt/blob/master/examples/config_file_example.py