From patchwork Tue Aug 20 14:52:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Atharva Lele X-Patchwork-Id: 1150219 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.136; helo=silver.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="rzxw0P1e"; dkim-atps=neutral Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 46CYh25N6pz9sPx for ; Wed, 21 Aug 2019 00:53:22 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 02372227CC; Tue, 20 Aug 2019 14:53:21 +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 hCfpk-JTGVJO; Tue, 20 Aug 2019 14:53:13 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 9738822850; Tue, 20 Aug 2019 14:53:12 +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 CCE3A1BF82B for ; Tue, 20 Aug 2019 14:52:42 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id C99502040F for ; Tue, 20 Aug 2019 14:52:42 +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 QFAq+0sIHNdr for ; Tue, 20 Aug 2019 14:52:42 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pg1-f194.google.com (mail-pg1-f194.google.com [209.85.215.194]) by silver.osuosl.org (Postfix) with ESMTPS id 48957203F8 for ; Tue, 20 Aug 2019 14:52:42 +0000 (UTC) Received: by mail-pg1-f194.google.com with SMTP id n4so3401726pgv.2 for ; Tue, 20 Aug 2019 07:52:42 -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=aLxGwz1J4lUuW+a7bzUI6zucMcFqBIVRz99y0SIxcbc=; b=rzxw0P1ew1fsDpdJc6GVygKGlsjXqw8+GQNXDa2tUfIfKRmfrdcUmLHL6Gac0YiT2c G94OHZYoBExZd9h/0nnUYhAayWlhMP8i2z91/BXKLVrHPp/6qYkhFKElfxvEEwR45Ibw IslGwAe+FItKXxAmUGIxJdQk+cPTTVpwQK19WXn6ken8TWpMsQkKR46/Hyd3GSeVRaNi zzbv7JxM1HX2Kcjc1JjfIuZACC3YImBQ3jCjKbMa7Xc3huTu2NqFNDZz30kUkLVxnmVJ zY/9m7QFvJWx/i7lZgPYBKpOnnVksGjT5+Qi6H6fsS4XqeX1Kk5eeUR+MWb1FQsa4Z41 eiGg== 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=aLxGwz1J4lUuW+a7bzUI6zucMcFqBIVRz99y0SIxcbc=; b=KGYIGgH0jY+vZ5NdzjwIsVS/ayDlO/z0FMxCAujm2SYncnHMv5/w1yw1jD8RVL+ICk SwU+05q2f+d93p89A9xWlYakDhSlpbIUYH4jU1L17qAtHTebt8tHXiMxtif9ILiiwQ7M LPbyERgykdX3/qzvm1qrdBmtdhLHW5BOCJHRLFiHgwmPgy2HtYIULlJXHoIA3pMYHhqE vKlQOq8W2IEzCdkMNU2+5IqzZsyWG5uvsR8B0JerCHjvOtEFzdvhnHF53GJZZDZVw7vV YJjEpEfBrpsnQl27geZV2+deQv2fZ1NDvmtdYmgc4Kb5sWSEGPGaOabsHe/fQxYBzKPm OJxA== X-Gm-Message-State: APjAAAXO8aZFokamCcwSW0/gCzXhQ0UnicqKAHKfgG+nXPlAQp29vsb5 K8ctAmJvr3dvyUvCrmhpllXW1rJbwqE= X-Google-Smtp-Source: APXvYqx8yPX4BV9gIWHTvnAHtvtIjfWNMtPb+dIJfO5XS9Vpxjd/4Q6CRSTcYrHdOP530zfOQZ0TOQ== X-Received: by 2002:a62:c584:: with SMTP id j126mr30479495pfg.21.1566312761515; Tue, 20 Aug 2019 07:52:41 -0700 (PDT) Received: from localhost.localdomain ([123.201.116.168]) by smtp.gmail.com with ESMTPSA id a1sm24502643pgh.61.2019.08.20.07.52.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Aug 2019 07:52:41 -0700 (PDT) From: Atharva Lele To: buildroot@buildroot.org Date: Tue, 20 Aug 2019 20:22:29 +0530 Message-Id: <20190820145231.15507-3-itsatharva@gmail.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190820145231.15507-1-itsatharva@gmail.com> References: <20190820145231.15507-1-itsatharva@gmail.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH v4 3/5] autobuild-run: account for reproducibility failures in get_failure_reason() 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 , thomas.petazzoni@bootlin.com Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Signed-off-by: Atharva Lele --- Changes v1 -> v3: - Account for changed name of diffoscope output --- scripts/autobuild-run | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/scripts/autobuild-run b/scripts/autobuild-run index 384cf73..876feb2 100755 --- a/scripts/autobuild-run +++ b/scripts/autobuild-run @@ -689,15 +689,26 @@ class Builder: 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() - - regexp = re.compile(r'make: \*\*\* .*/(?:build|toolchain)/([^/]*)/') - for line in lastlines: - m = regexp.search(line) - if m: - return m.group(1).rsplit('-', 1) + # Output is "package-reproducible" in case of reproducibility failure. + + reproducible_results = os.path.join(self.resultdir, "diffoscope-results.json") + if os.path.exists(reproducible_results) and os.stat(reproducible_results).st_size > 0: + if self.sysinfo.has("diffoscope"): + reason = get_reproducibility_failure_reason(reproducible_results) + reason.append("nonreproducible") + return reason + else: + return ["nonreproducible"] + 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) # not found return None