From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH][autobuild] Use last 4 lines of log instead of 3 when getting failure reason
Date: Wed, 26 Oct 2016 13:52:59 +0200 [thread overview]
Message-ID: <20161026135259.425f0f0a@free-electrons.com> (raw)
In-Reply-To: <1477478717-19209-1-git-send-email-vzakhar@synopsys.com>
Hello,
On Wed, 26 Oct 2016 13:45:17 +0300, Vlad Zakharov wrote:
> Latest versions of make produce a bit different output than older
> versions do. They also print number of line in Makefile where the
> failure occurred.
>
> E.g. latest make produces the following output:
> ---------------------------------->8------------------------------------
> GNUmakefile:277: recipe for target 'cgiedit.o' failed
> make[2]: *** [cgiedit.o] Error 1
> package/pkg-generic.mk:201: recipe for target '/home/buildroot/autobuild/run/instance-2/output/build/privoxy-3.0.26/.stamp_built' failed
> make[1]: *** [/home/buildroot/autobuild/run/instance-2/output/build/privoxy-3.0.26/.stamp_built] Error 2
> Makefile:88: recipe for target '_all' failed
> make: *** [_all] Error 2
> make: Leaving directory '/home/buildroot/autobuild/run/instance-2/buildroot'
> ---------------------------------->8------------------------------------
>
> When with old version we get something like:
> ---------------------------------->8------------------------------------
> make[2]: *** [cgiedit.o] Error 1
> make[1]: *** [/home/buildroot/autobuild/run/instance-1/output/build/privoxy-3.0.26/.stamp_built] Error 2
> make: *** [_all] Error 2
> make: Leaving directory `/home/buildroot/autobuild/run/instance-1/buildroot'
> ---------------------------------->8------------------------------------
>
> So latest make produce much more "noise" and we have to analyze
> at least 4 last lines of log to be sure that they contain a line
> with failure reason.
>
> Signed-off-by: Vlad Zakharov <vzakhar@synopsys.com>
I'm a little bit worried about this change, because we did a fairly
similar change in commit 585358277b80dfe18b17b13035675bfe7db48b20,
which I quickly reverted in commit
a616a8c592caf2a9c9ce82ac1cac9681775452d3 because it was breaking
everything. Following 585358277b80dfe18b17b13035675bfe7db48b20, for a
large number of builds, the detected build failure was "all" or
"all-recursive".
So we really want to be extra careful, by testing the logic change on
existing build results first.
Also, another thing that is annoying that we have two places where we
calculate the failure reason: in autobuild-run (on the autobuild slave)
and in import.inc.php (which runs on autobuild.b.o when an autobuild
result is submitted).
Historically, the failure reason was only extracted in import.inc.php,
from the submitted log. But later on, some logic was added in
autobuild-run to extract the reason, which was used to make sure we
keep in build-end.log not just the 500 last lines of the build, but
the entire build log from the beginning of the failing package (which
requires knowing the package that failed building, and therefore
calculating the reason).
It would be great to get rid of this duplication, and have
autobuild-run calculate the reason, store it in a "reason" file,
submitted to autobuild.b.o as part of the tarball, and import.inc.php
simply reads that file. This way we have the reason calculation logic
in just one place.
Thanks,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
next prev parent reply other threads:[~2016-10-26 11:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-26 10:45 [Buildroot] [PATCH][autobuild] Use last 4 lines of log instead of 3 when getting failure reason Vlad Zakharov
2016-10-26 11:52 ` Thomas Petazzoni [this message]
2016-10-26 12:29 ` Vlad Zakharov
2016-11-11 16:04 ` Vlad Zakharov
2017-04-14 22:48 ` Arnout Vandecappelle
2017-04-15 7:25 ` 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=20161026135259.425f0f0a@free-electrons.com \
--to=thomas.petazzoni@free-electrons.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