From patchwork Tue Aug 6 18:12:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Atharva Lele X-Patchwork-Id: 1143014 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="Bwe90TPP"; 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 4632nL0Cp4z9sN1 for ; Wed, 7 Aug 2019 04:13:25 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 3FFCF21FA8; Tue, 6 Aug 2019 18:13:22 +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 ehEV6UiZxLKy; Tue, 6 Aug 2019 18:13:20 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id F1B082154E; Tue, 6 Aug 2019 18:13:19 +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 EDA4F1BF2F4 for ; Tue, 6 Aug 2019 18:13:16 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id E9B9186044 for ; Tue, 6 Aug 2019 18:13:16 +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 XlR6wpYCYQ4e for ; Tue, 6 Aug 2019 18:13:15 +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 BD6BE86030 for ; Tue, 6 Aug 2019 18:13:15 +0000 (UTC) Received: by mail-pf1-f195.google.com with SMTP id t16so41907302pfe.11 for ; Tue, 06 Aug 2019 11:13:15 -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=g72rXIxCQ0mpJLanEnXpdgNsf0LgWshq+q12vhzPPdI=; b=Bwe90TPPOTO6Jm5tdmNOe37wI06OGD8Rg1vG52zsnosoLk2ygdTBBo5p+hd67z+xZS AwLRHPPYQ2u7Vm8MhepeYuve9vshMO2biaUX7VhRjnXygbz4u3uHoW0VDDAlKET7/lIS 5/n8g8/M0z3rsGgcCf63tY4exQj6wE3hy2Xr9KIGLOmngyoNKeHkrirranYvTOAA3JlA M5eJZlWaQLKY73wIAAFzPIvP7pICcvDpmdgMELKBizqeM/DcaSz7qgCZRMVbkKftafyP BKI5hkZTa3tDa49IeSQQRIFmoEK6yGDyhDfoR3HF1xAKQOopqKeGJ1gwhP7auIAX0ixu +b+g== 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=g72rXIxCQ0mpJLanEnXpdgNsf0LgWshq+q12vhzPPdI=; b=nETtMTaqyfo+8cHmKgSeFLFE3c2W63KDL6BiJscQBgap/Q6s+GXQvkvE+nFlUDoOpl I6NL4FupnZV5TL6YRhZA8Ny3LmMjb1B2pOpJ00rZO3nTlI//i97LwXAkTSWHwLP+iPrM o9neRfzQKVjigIJ9TC4c5p2xM63GvH8AG5HXnm9PndxHzY5e741JJ51HiyHUIjXip8oa V+X/MiUnP5S5QvH4zmhARygWHbiM7Ej158DxqweprWgZhVltX4ARqwo9eW+7rsY1Eqbk OxqtOcgbMJtEvjdAZQqpEYZ36i3p/X9QYwZ7jWZmHW14pkXLhSlwXaSUK2/x2czwCt99 kDLQ== X-Gm-Message-State: APjAAAWi7h9ZnGAVJ42vPFiL6e+7b1WPxyXOd9FhrJmfwbXVJhJ0lbId Ja1ZJsEupVgH2O3GSHFLbwv61Hwl5qg= X-Google-Smtp-Source: APXvYqxNwXlugBq2SH4X2KGSkVayR6nlLltHQUDl2ZTOMwYfdONFBE2dwCkMD3sB+14gv+asSjAdQQ== X-Received: by 2002:a62:ae02:: with SMTP id q2mr4914637pff.1.1565115194993; Tue, 06 Aug 2019 11:13:14 -0700 (PDT) Received: from localhost.localdomain ([123.201.52.51]) by smtp.gmail.com with ESMTPSA id f3sm144563777pfg.165.2019.08.06.11.13.12 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 06 Aug 2019 11:13:14 -0700 (PDT) From: Atharva Lele To: buildroot@buildroot.org Date: Tue, 6 Aug 2019 23:42:51 +0530 Message-Id: <20190806181251.21885-6-itsatharva@gmail.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190806181251.21885-1-itsatharva@gmail.com> References: <20190806181251.21885-1-itsatharva@gmail.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH 6/6] 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 , 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 | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/scripts/autobuild-run b/scripts/autobuild-run index f2f6460..1f12355 100755 --- a/scripts/autobuild-run +++ b/scripts/autobuild-run @@ -669,15 +669,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, "reproducible_results") + 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