Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH buildroot-test] web/import.inc.php: account for failures that contain an images/ path
Date: Sun, 16 Jun 2019 22:13:38 +0200	[thread overview]
Message-ID: <20190616201338.4593-1-thomas.petazzoni@bootlin.com> (raw)

With the testing of BR2_REPRODUCIBLE=y recently added and its
generation of a tar filesystem, we are now testing the tar filesystem
generation logic, and this reveals some interesting breakage, such as:

  http://autobuild.buildroot.net/results/fe3/fe378bca29c86a681ba9ad40386cb89248195c50/build-end.log

However, the "reason" deduced from the build log by the PHP logic is a
bit crappy, it's
"/home/br-user/autobuild/run/instance-0/output/images/rootfs.tar".

This commit adjusts the ugly PHP code with even more ugliness to take
into account the fact that a path may look like
foo/thing/build/<pkg>-<version>/.stamp_something or like
foo/thing/images/rootfs.tar.

The reasons extracted for the two previous examples would be
"<pkg>-<version>" (like is done today) and "rootfs.tar".

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
 web/import.inc.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/web/import.inc.php b/web/import.inc.php
index 5b5462e..956c6d8 100644
--- a/web/import.inc.php
+++ b/web/import.inc.php
@@ -231,7 +231,7 @@ function import_result($buildid, $filename)
       $reason = "none";
     else {
 	$tmp = Array();
-	exec("tail -3 " . $thisbuildfinaldir . "build-end.log | grep -v '\[_all\]' | grep 'make.*: \*\*\*' | sed 's,.*\[\([^\]*\)\] Error.*,\\1,' | sed 's,.*/build/\([^/]*\)/.*,\\1,'", $tmp);
+	exec("tail -3 " . $thisbuildfinaldir . "build-end.log | grep -v '\[_all\]' | grep 'make.*: \*\*\*' | sed 's,.*\[\([^\]*\)\] Error.*,\\1,' | sed 's,.*/\(images\|build\)/\([^/]*\).*,\\2,'", $tmp);
 	if (trim($tmp[0]))
 	  $reason = $tmp[0];
 	else {
-- 
2.21.0

             reply	other threads:[~2019-06-16 20:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-16 20:13 Thomas Petazzoni [this message]
2019-06-17 19:39 ` [Buildroot] [PATCH buildroot-test] web/import.inc.php: account for failures that contain an images/ path Arnout Vandecappelle
2019-06-18 10:18   ` Thomas Petazzoni
2019-06-18 10:23     ` Arnout Vandecappelle
2019-06-18 10:36       ` Atharva Lele

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190616201338.4593-1-thomas.petazzoni@bootlin.com \
    --to=thomas.petazzoni@bootlin.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox