From patchwork Sat Aug 10 03:59:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Atharva Lele X-Patchwork-Id: 1145051 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.137; helo=fraxinus.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="SkF590dk"; dkim-atps=neutral Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4657f46wqsz9sN4 for ; Sat, 10 Aug 2019 13:59:24 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id CF798868DC; Sat, 10 Aug 2019 03:59:20 +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 6RXT0tZd3kz4; Sat, 10 Aug 2019 03:59:20 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 4417E86A02; Sat, 10 Aug 2019 03:59:20 +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 C128C1BF20D for ; Sat, 10 Aug 2019 03:59:16 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id BE95C8815F for ; Sat, 10 Aug 2019 03:59:16 +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 VxPbMX2p647n for ; Sat, 10 Aug 2019 03:59:16 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pg1-f195.google.com (mail-pg1-f195.google.com [209.85.215.195]) by hemlock.osuosl.org (Postfix) with ESMTPS id 598F687F81 for ; Sat, 10 Aug 2019 03:59:16 +0000 (UTC) Received: by mail-pg1-f195.google.com with SMTP id o13so46767396pgp.12 for ; Fri, 09 Aug 2019 20:59:16 -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=Bm+G2ZT5hYBdw0KGNwaqxmT0IkuF8KaDQ04duZ4OrFY=; b=SkF590dkvZX0sYUd4tELXJ6AJRVnO9EUT2FXqULBkND92H8Ng+ViExIsiYzhDxtnwP fPjrR2Jefm8zBZnmSpG07Fe75r0Luco1jFSSHg8Fwf3XqBCQC2T6gjQf1HY5KCVEXyC0 2Z2XrEzMARo4qhQRkVRcwAXxi4kQhnvAt33Y1I0jnCZzTUcrIYYrrLi37aXVKdob0z/W KlA9jxXmt7yNCTvp4WJs32etpDwrMndrGOUSnlR6ttQTRR7Cntg2hIgylRLjNEAa8quC AlxM/zj+1k0SMzy9cv9pNSd6Ft1iFnXVVQC+jOKZREiyGTNFMc3Rw5s/9aMOvQsHAEai L40w== 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=Bm+G2ZT5hYBdw0KGNwaqxmT0IkuF8KaDQ04duZ4OrFY=; b=GWh1N/fJydqQrgpfVd3BZDty1ysLcd2Zbq/nealpL8WCBxYMXXS3b+7D9ifO/Rrd8H 9INwKnZkXMUvQJXgpX7DhLwEIiSQz6BjDLSbN/kiJsVEHmiSgwp++H0D6BZdq6nkeh/v wCkJRmVvJQFQNAC6UyYmNyP0kB7q00M3dKZSG6MjA6KHaa3WH456uAChMBxPsCHggj8c TvjXDY/BUlL0KcgJdQ4wP29a+ludNyhG2X9nisDuAjV4JYvRqFg5A9wYFIo5TkCqL8lW 6NlEz5pBb2AG1CvVPHZUFz1ATAmCD7cvtZZ+QlPvTfRgEwQTn7cfmj4loiig9lYTDmxa 8hAw== X-Gm-Message-State: APjAAAUsDXmFetILijuxIyCpbuj7XnI9PglKJr0hu10bgCfrqNP4JD45 IfXAYy0Xfg6riBM7I7S3qvGzrE341sg= X-Google-Smtp-Source: APXvYqxL4A1oyh30xOpvreDi5LwKcuxRj0sy67H7I1XlMxY2VPlr8J20n1hld5YziYIWFbqdzdcIFw== X-Received: by 2002:a62:f250:: with SMTP id y16mr25107962pfl.50.1565409555552; Fri, 09 Aug 2019 20:59:15 -0700 (PDT) Received: from localhost.localdomain ([123.201.36.122]) by smtp.gmail.com with ESMTPSA id o32sm6527465pje.9.2019.08.09.20.59.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Aug 2019 20:59:15 -0700 (PDT) From: Atharva Lele To: buildroot@buildroot.org Date: Sat, 10 Aug 2019 09:29:00 +0530 Message-Id: <20190810035902.14047-3-itsatharva@gmail.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190810035902.14047-1-itsatharva@gmail.com> References: <20190810035902.14047-1-itsatharva@gmail.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH v2 3/5] autobuild-run: make diffoscope output a JSON-formatted file as well 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" Normal diffoscope output is readable by humans but not really convenient when working with it in code. JSON can be easily read and extracted information from. We still keep the normal text version because it's easy to parse by a human, but we limit its size to 40KB. Signed-off-by: Atharva Lele --- Changes v1 -> v2: - Save text output as well as JSON --- scripts/autobuild-run | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/autobuild-run b/scripts/autobuild-run index 69766b2..6adfa99 100755 --- a/scripts/autobuild-run +++ b/scripts/autobuild-run @@ -440,6 +440,7 @@ class Builder: """ reproducible_results = os.path.join(self.outputdir, "results", "reproducible_results") + reproducible_results_text = os.path.join(self.outputdir, "results", "reproducible_results_text") # Using only tar images for now build_1_image = os.path.join(self.outputdir, "images", "rootfs.tar") build_2_image = os.path.join(self.outputdir_2, "images", "rootfs.tar") @@ -453,7 +454,9 @@ class Builder: prefix = prefix[13:-1] log_write(self.log, "INFO: running diffoscope on images") subprocess.call(["diffoscope", build_1_image, build_2_image, - "--tool-prefix-binutils", prefix], stdout=diff, stderr=self.log) + "--tool-prefix-binutils", prefix, "--json", "-", + "--text", reproducible_results_text, "--max-text-report-size", "40000"], + stdout=diff, stderr=self.log) else: log_write(self.log, "INFO: diffoscope not installed, falling back to cmp") subprocess.call(["cmp", "-b", build_1_image, build_2_image], stdout=diff, stderr=self.log)