All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matt Weber <matt@thewebers.ws>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v2 2/2] buildroot-test: failure reason regex update
Date: Thu, 31 Mar 2016 19:02:52 -0500	[thread overview]
Message-ID: <1459468972-31420-2-git-send-email-matt@thewebers.ws> (raw)
In-Reply-To: <1459468972-31420-1-git-send-email-matt@thewebers.ws>

- Sub-make required one additional line tailed
- Both autobuild-run  regex to truncate end log
  and import which sets the failure reason on
  the report are updated

Signed-off-by: Matt Weber <matt@thewebers.ws>

--
Changes for v2:
- Added back in : as previous test masked
  that is was ok to leave in (Suggested by Thomas)
---
 scripts/autobuild-run | 4 ++--
 web/import.inc.php    | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/scripts/autobuild-run b/scripts/autobuild-run
index 1fbf482..f9743a8 100755
--- a/scripts/autobuild-run
+++ b/scripts/autobuild-run
@@ -665,10 +665,10 @@ def send_results(result, **kwargs):
     def get_failure_reason():
         # Output is a tuple (package, version), or None.
         lastlines = decode_bytes(subprocess.Popen(
-            ["tail", "-n", "3", os.path.join(outputdir, "logfile")],
+            ["tail", "-n", "4", os.path.join(outputdir, "logfile")],
             stdout=subprocess.PIPE).communicate()[0]).splitlines()
 
-        regexp = re.compile(r'make: \*\*\* .*/(?:build|toolchain)/([^/]*)/')
+        regexp = re.compile(r'make.*: \*\*\* .*/(?:build|toolchain)/([^/]*)/')
         for line in lastlines:
             m = regexp.search(line)
             if m:
diff --git a/web/import.inc.php b/web/import.inc.php
index 243a1f3..e169f6f 100644
--- a/web/import.inc.php
+++ b/web/import.inc.php
@@ -102,7 +102,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 -4 " . $thisbuildfinaldir . "build-end.log | grep -v '\[_all\]' | grep 'make.*: \*\*\*' | sed 's,.*\[\([^\]*\)\] Error.*,\\1,' | sed 's,.*/build/\([^/]*\)/.*,\\1,'", $tmp);
 	if (trim($tmp[0]))
 	  $reason = $tmp[0];
 	else
-- 
2.5.0

  reply	other threads:[~2016-04-01  0:02 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-01  0:02 [Buildroot] [PATCH v2 1/2] buildroot-test: enable toolchains based on hostarch Matt Weber
2016-04-01  0:02 ` Matt Weber [this message]
2016-04-01  1:55   ` [Buildroot] [PATCH v2 2/2] buildroot-test: failure reason regex update Thomas Petazzoni
2016-04-01  2:37     ` Matthew Weber
2016-04-01  3:58       ` Thomas Petazzoni
2016-04-01  4:04         ` Matthew Weber
2016-04-01  4:21           ` Thomas Petazzoni
2016-09-06 20:04   ` Thomas Petazzoni
2016-09-06 21:20     ` Yann E. MORIN
2016-09-07  7:17     ` Thomas Petazzoni
2016-09-07  8:59       ` Yann E. MORIN
2016-04-21 21:05 ` [Buildroot] [PATCH v2 1/2] buildroot-test: enable toolchains based on hostarch Thomas Petazzoni

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=1459468972-31420-2-git-send-email-matt@thewebers.ws \
    --to=matt@thewebers.ws \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.