From patchwork Sat Jun 22 18:41:17 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Atharva Lele X-Patchwork-Id: 1120711 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="drEcy9+E"; 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 45WPXd2F8wz9s4V for ; Sun, 23 Jun 2019 04:41:37 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id BD88C81420; Sat, 22 Jun 2019 18:41:34 +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 YCK2zOxniT3B; Sat, 22 Jun 2019 18:41:34 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id D961F85C90; Sat, 22 Jun 2019 18:41:33 +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 AAB9C1BF2A9 for ; Sat, 22 Jun 2019 18:41:32 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id A7E3E85037 for ; Sat, 22 Jun 2019 18:41:32 +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 Yk916YAEKNeb for ; Sat, 22 Jun 2019 18:41:32 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pl1-f194.google.com (mail-pl1-f194.google.com [209.85.214.194]) by hemlock.osuosl.org (Postfix) with ESMTPS id D3C9E85325 for ; Sat, 22 Jun 2019 18:41:31 +0000 (UTC) Received: by mail-pl1-f194.google.com with SMTP id e5so4572955pls.13 for ; Sat, 22 Jun 2019 11:41:31 -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=BLibBRhQ2r/TirW1n3UvlG8Gp1OfEAEbxP3H24nrlao=; b=drEcy9+EtKvo5sZtUjSa/ObOYxAPkDGjUpXATXWbpTm5AbafWFyFpBbFfkKnVdo1Ts gbIbCirsRNTlSrV80PkSJhk9aT8rX4Hk5uE/hphqEWvNO01Hquil06OdK/QSfwyK4s4e mStbyL6hbJ08Hl2D6RxPJOFHWmqVCiGw+xiLXwuDBpftZ2JznWAAObq9NB699h32B5BZ TG85uSddMifG3u2fhR7PiHV8hHT86LzPim6OVq83yTT67xZCV/dA2OzD5wP2GV5v1BSs aBZ7ypI64XO1Tb594VZtwt9FaX49X4AMoleB/d9QmYfL7mmy/a5e+OiD4kBE49HmmVPJ Gadw== 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=BLibBRhQ2r/TirW1n3UvlG8Gp1OfEAEbxP3H24nrlao=; b=T9L1HzTFa/v6IgcC8TqLaLwKL43a5RM29bZVDkQ6YiCAE5dduI93mfuNssMsIjyanM D3LWOgqIaPJAtF2OGd8yvRtyNYbeJTb/Sg9ddwUk+fzyAhGN/CmmPUdOQYVXV1jxMmwo gdMYH5YUw7grZ7gvpfkjcq8H77s0K4CpiG+DR2NrGbWG763ILvpGG+kCY7PRUDWt8udT odN0s0wtG6DWc1k4XasuGPF28wVD9vbU0tr84eRsv3m8Xd6wzg0W1Ce52cLQpZdF8rUU vmnOTP2ScyoAeoNWEWMTv0xu5ntiB2DmhusW7qZqK9VH3OTBoJ/O21cKj8tOXShEqpnE kpzA== X-Gm-Message-State: APjAAAUySz5Dxtf2HL+Xpwv0IgAftNRbZ4CRgF3P3+ypwAVerkhqjEjd HHrHErkwbITBRM5cOCsc2Jzt63cw2qT84A== X-Google-Smtp-Source: APXvYqwGz3HnJ9uVtLv/iIq8wZW1yvbAlJ9zlRzC1LqG2u57z7VAQfjJVgmuMZanKtbN5QvP58cFaQ== X-Received: by 2002:a17:902:8d95:: with SMTP id v21mr116364164plo.225.1561228891073; Sat, 22 Jun 2019 11:41:31 -0700 (PDT) Received: from localhost.localdomain ([123.201.36.84]) by smtp.gmail.com with ESMTPSA id w7sm3316609pfb.117.2019.06.22.11.41.28 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sat, 22 Jun 2019 11:41:30 -0700 (PDT) From: Atharva Lele To: buildroot@buildroot.org Date: Sun, 23 Jun 2019 00:11:17 +0530 Message-Id: <20190622184118.5627-2-itsatharva@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190622184118.5627-1-itsatharva@gmail.com> References: <20190622184118.5627-1-itsatharva@gmail.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH v2 2/3] autobuild-run: account for reproducibility failures when creating the reason file 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 --- Changes v1 -> v2: - Split into separate commit for reproducibility failures --- scripts/autobuild-run | 33 +++++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/scripts/autobuild-run b/scripts/autobuild-run index c18d8aa..6068376 100755 --- a/scripts/autobuild-run +++ b/scripts/autobuild-run @@ -582,16 +582,26 @@ class Builder: return def get_failure_reason(): - # Output is a tuple (package, version), or None. - lastlines = decode_bytes(subprocess.Popen( - ["tail", "-n", "3", os.path.join(self.outputdir, "logfile")], - stdout=subprocess.PIPE).communicate()[0]).splitlines() + # Output is a tuple (package, version), or None in case of package failure + # Output is "reproducible" in case of reproducibility failure + + reproducible_results = os.path.join(self.resultdir, "reproducible_results") + if os.path.exists(reproducible_results): + if os.stat(reproducible_results).st_size > 0: + reason = "reproducible" + return reason + else: + return None + else: + lastlines = decode_bytes(subprocess.Popen( + ["tail", "-n", "3", os.path.join(self.outputdir, "logfile")], + stdout=subprocess.PIPE).communicate()[0]).splitlines() - regexp = re.compile(r'make: \*\*\* .*/(?:build|toolchain)/([^/]*)/') - for line in lastlines: - m = regexp.search(line) - if m: - return m.group(1).rsplit('-', 1) + regexp = re.compile(r'make: \*\*\* .*/(?:build|toolchain)/([^/]*)/') + for line in lastlines: + m = regexp.search(line) + if m: + return m.group(1).rsplit('-', 1) # not found return None @@ -599,7 +609,10 @@ class Builder: reason = get_failure_reason() if reason: with open(os.path.join(self.resultdir, "reason"), "w+") as reasonf: - reasonf.write("-".join(reason)) + if reason == "reproducible": + reasonf.write(reason) + else: + reasonf.write("-".join(reason)) def extract_end_log(resultfile): """Save the last part of the build log, starting from the failed package"""