From patchwork Sun Jul 7 05:28:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Atharva Lele X-Patchwork-Id: 1128579 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="VUrge/ly"; 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 45hHGl2yQxz9s8m for ; Sun, 7 Jul 2019 15:30:23 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 258D9859C9; Sun, 7 Jul 2019 05:30:18 +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 J5xxhqmu0dup; Sun, 7 Jul 2019 05:30:16 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 0DE3D86A07; Sun, 7 Jul 2019 05:30:16 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 96D001BF5DD for ; Sun, 7 Jul 2019 05:30:08 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 931878527F for ; Sun, 7 Jul 2019 05:30:08 +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 UNn4VrYQuDU8 for ; Sun, 7 Jul 2019 05:30:06 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pf1-f195.google.com (mail-pf1-f195.google.com [209.85.210.195]) by whitealder.osuosl.org (Postfix) with ESMTPS id 8DB83810BD for ; Sun, 7 Jul 2019 05:30:06 +0000 (UTC) Received: by mail-pf1-f195.google.com with SMTP id r1so5985568pfq.12 for ; Sat, 06 Jul 2019 22:30:06 -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=yEZqti3IuI/c7LhS6yfZcxv/8QAMnedp/eD4w8Nmf6M=; b=VUrge/lyZkN+JA2TJAvr8JGYDaZ27YE6FFCqSPFf2yd9y7Iff5KQxOGnCJOnnkPmBF b2RETAchDUk3fejv4U3+RUU/ktNXeHf3+mhrQd65lURSJpmdXbSRcUnz1BXuj/po9RQ/ 3KQxZAutH7mruimJK/K5Em3MF0didahdUKwOSjm9ew/dMoJdw+3lgwGWfgTX94q5K5xj Uou+xdS7oF7qpt3UKjOcwpneKgU5hV3+VyxC59/4nflV3V55EazgyAVkmUWgxLohZTMb XPJX/jYJ9cycP38mpOtLunK8VD5QBfFJZ7F/ctBeqi4QhtzcmMrChmUUjijIPWL9Ah20 KUJQ== 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=yEZqti3IuI/c7LhS6yfZcxv/8QAMnedp/eD4w8Nmf6M=; b=OGLh8F8XbUQ8kUkdheLkR/Ys+/ptFg11s2NAS81ub/goNIc//AGf+1REZ/FklrTw1h w8dwwO6yIMWktFXC27GxcwDLWuN+Aw05aHyDNeid/z8MZ1mxjNbcPE8L8HykQelYPFV5 Ns/IcJPRV+7q+lsau2rL4afYh2xJ9PseEkKw6DO1OU/RU5wGRbvlNB2oX1kNNYEET2+B +tlIIjkyaONAxSdbq9T8lQ+5BlIq9qIFWunIaepMbWJR5mc2sPS0E2V1bTmnWrPt0tWL YXxeVZnMTCxw7uWgJAj87RziKFS68QNBDkl25Hvs/z+jQ1iPIpsc2c3bKuGiiZQ6ETgu ITGA== X-Gm-Message-State: APjAAAWFxXVK+XygSmUBKB0wPGcbkvV3p6Qq6E1gNRMGTgfmxA15Gjt2 AKAnqmsjmWD1El/H49O+TVZv9JryrVSlTw== X-Google-Smtp-Source: APXvYqyeqTOo2bDGVlJr+97ZVoSDNzI4/MPNB6agRj3vDAKSLh+0qv2cTqPJnL/sUlpAA6+YGZ4XVA== X-Received: by 2002:a65:4d4e:: with SMTP id j14mr14306896pgt.50.1562477405710; Sat, 06 Jul 2019 22:30:05 -0700 (PDT) Received: from localhost.localdomain ([123.201.194.71]) by smtp.gmail.com with ESMTPSA id j24sm18039214pgg.86.2019.07.06.22.30.03 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sat, 06 Jul 2019 22:30:05 -0700 (PDT) From: Atharva Lele To: buildroot@buildroot.org Date: Sun, 7 Jul 2019 10:58:30 +0530 Message-Id: <20190707052831.9469-30-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 30/31] autobuild-run: use different output directories for reproducible builds testing 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 --- scripts/autobuild-run | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/scripts/autobuild-run b/scripts/autobuild-run index 84212c6..cdf013c 100755 --- a/scripts/autobuild-run +++ b/scripts/autobuild-run @@ -434,8 +434,8 @@ class Builder: reproducible_results = os.path.join(self.outputdir, "results", "reproducible_results") # Using only tar images for now - build_1_image = os.path.join(self.outputdir, "images-1", "rootfs.tar") - build_2_image = os.path.join(self.outputdir, "images", "rootfs.tar") + build_1_image = os.path.join(self.outputdir, "images", "rootfs.tar") + build_2_image = os.path.join(self.outputdir_1, "images", "rootfs.tar") with open(reproducible_results, 'w') as diff: if self.sysinfo.has("diffoscope"): @@ -522,16 +522,17 @@ class Builder: log_write(self.log, "INFO: build 1 failed, skipping build 2") return ret - # First build has been built, move files and start build 2 - os.rename(os.path.join(self.outputdir, "images"), os.path.join(self.outputdir, "images-1")) + # Create the second output directory if it does not exist + if not os.path.exists(self.outputdir_1): + os.mkdir(self.outputdir_1) - # Clean up build 1 - f = open(os.path.join(self.outputdir, "logfile"), "w+") - subprocess.call(["make", "O=%s" % self.outputdir, "-C", self.srcdir, "clean"], stdout=f, stderr=f) + # Copy .config to the other output directory + shutil.copyfile(os.path.join(self.outputdir, ".config"), + os.path.join(self.outputdir_1, ".config")) # Start the second build log_write(self.log, "INFO: Reproducible Build Test, starting build 2") - ret = self.do_build(self.outputdir) + ret = self.do_build(self.outputdir_1) if ret != 0: log_write(self.log, "INFO: build 2 failed") return ret