[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Autobuild-discuss] Re: four small patches
From: |
Simon Josefsson |
Subject: |
[Autobuild-discuss] Re: four small patches |
Date: |
Wed, 11 Aug 2010 13:51:46 +0200 |
User-agent: |
Gnus/5.110011 (No Gnus v0.11) Emacs/23.1 (gnu/linux) |
Ralf Wildenhues <address@hidden> writes:
> Hi Simon,
Hi Ralf. I'm moving this to the address@hidden list, and
I'm removing all uses of address@hidden address because I
haven't been using it.
> attached please fine four small patches that would make Autobuild more
> useful for Libtool.
>
> Libtool has two test suites: an old, Automake TESTS one, and an Autotest
> one. I reorganized matching a bit so that failures of any cause the
> status to not be 'ok', and ordered 'built' in the middle.
Thanks, I'll take a look.
The tool should REALLY be rewritten into two parts, one that outputs a
summary for each build log (in *.rec format ;-)) and one part that
creates the HTML files from the meta-format. I'll see if I can manage
to do this soonish, and then adapt your patches. If I don't complete
this (many other things are stealing my free time..) soonish I'll just
apply your patches and make a release.
If you want this installed on the build server to get better log output
for you, let me know.
> As to tighter integration of Autobuild in Autotools, yes, discussing
> that is on my TODO list, but I figured getting some experience with the
> tool first couldn't hurt.
Sure. Brian suggested that I extract build timestamp and and build
hostname from the e-mail logs, and I think that is a good idea. The
host triplet is still needed though, but that is less privacy sensitive.
It is not perfect, as I never intended for e-mail to be the only way to
deliver logs but it is good enough for now.
/Simon
> Thanks,
> Ralf
> From 101a7cc16e6b0a4f61a33ff9626ec0978f7f9f9b Mon Sep 17 00:00:00 2001
> From: Ralf Wildenhues <address@hidden>
> Date: Tue, 10 Aug 2010 19:36:41 +0200
> Subject: [PATCH 1/4] Cope with '(cached) ' when detecting host and build
> output.
>
> ---
> autobuild | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/autobuild b/autobuild
> index 8541af3..47e789f 100755
> --- a/autobuild
> +++ b/autobuild
> @@ -168,8 +168,8 @@ foreach $arg (@ARGV) {
> $timestamp = $1 if !$Timestamp && m,autobuild timestamp... (.+),;
>
> # GNU Autoconf host/build output.
> - $hosttype = $3 if !$hosttype && m,host system type(<[^>]+>)?\.\.\.
> (<[^>]+>)?([a-z0-9_.-]+),;
> - $buildtype = $3 if !$buildtype && m,build system
> type(<[^>]+>)?\.\.\. (<[^>]+>)?([a-z0-9_.-]+),;
> + $hosttype = $4 if !$hosttype && m,host system type(<[^>]+>)?\.\.\.
> (\(cached\) )?(<[^>]+>)?([a-z0-9_.-]+),;
> + $buildtype = $4 if !$buildtype && m,build system
> type(<[^>]+>)?\.\.\. (\(cached\) )?(<[^>]+>)?([a-z0-9_.-]+),;
>
> # Automake self test or distcheck output.
> $status = "ok" if !$status && m,All \d+ tests passed,;
> --
> 1.7.2.rc3.47.g996ce
>
> From 6dd7eae2deaa2db877770e2569657f54ad9b50ab Mon Sep 17 00:00:00 2001
> From: Ralf Wildenhues <address@hidden>
> Date: Tue, 10 Aug 2010 19:37:06 +0200
> Subject: [PATCH 2/4] Match Autotest test output.
>
> ---
> autobuild | 6 ++++++
> 1 files changed, 6 insertions(+), 0 deletions(-)
>
> diff --git a/autobuild b/autobuild
> index 47e789f..2560ed0 100755
> --- a/autobuild
> +++ b/autobuild
> @@ -171,6 +171,12 @@ foreach $arg (@ARGV) {
> $hosttype = $4 if !$hosttype && m,host system type(<[^>]+>)?\.\.\.
> (\(cached\) )?(<[^>]+>)?([a-z0-9_.-]+),;
> $buildtype = $4 if !$buildtype && m,build system
> type(<[^>]+>)?\.\.\. (\(cached\) )?(<[^>]+>)?([a-z0-9_.-]+),;
>
> + # Autotest test output.
> + $status = "almost" if !$status && m,(passed|failed) unexpectedly,;
> + $status = "almost" if !$status && m,did not behave as expected,;
> + $status = "ok" if !$status && m,tests? w(as|ere) successful,;
> + $status = "ok" if !$status && m,behaved as expected,;
> +
> # Automake self test or distcheck output.
> $status = "ok" if !$status && m,All \d+ tests passed,;
> $status = "ok" if !$status && m,1 test passed,;
> --
> 1.7.2.rc3.47.g996ce
>
> From 3c8b02acaf0ea55bf90756bf852f5cd54df71d69 Mon Sep 17 00:00:00 2001
> From: Ralf Wildenhues <address@hidden>
> Date: Tue, 10 Aug 2010 19:40:57 +0200
> Subject: [PATCH 3/4] Ensure not to hide failures with multiple status
> notifiers.
>
> * autobuild (set_status): New function.
> (foreach @ARGV): Use it to ensure we also catch failures when
> multiple test suites are used.
> ---
> autobuild | 47 +++++++++++++++++++++++++++++++++--------------
> 1 files changed, 33 insertions(+), 14 deletions(-)
>
> diff --git a/autobuild b/autobuild
> index 2560ed0..cb797a6 100755
> --- a/autobuild
> +++ b/autobuild
> @@ -100,6 +100,25 @@ if ($PrintHelp || (!$PrintVersion && $#ARGV == -1)) {
> exit 0;
> }
>
> +# set_status status newstatus
> +# Return NEWSTATUS, unless STATUS is already worse.
> +# Order: undef < ok < almost < built < fail
> +sub set_status ($$)
> +{
> + my ($status, $newstatus) = @_;
> + if (!defined $status || $status eq 'ok') {
> + return $newstatus;
> + } elsif ($status eq 'almost' && $newstatus ne 'ok') {
> + return $newstatus;
> + } elsif ($status eq 'built' && ($newstatus ne 'ok'
> + && $newstatus ne 'almost')) {
> + return $newstatus;
> + } else {
> + return $status;
> + }
> +}
> +
> +
> # Core.
>
> my (@Files, $arg, $file);
> @@ -172,26 +191,26 @@ foreach $arg (@ARGV) {
> $buildtype = $4 if !$buildtype && m,build system
> type(<[^>]+>)?\.\.\. (\(cached\) )?(<[^>]+>)?([a-z0-9_.-]+),;
>
> # Autotest test output.
> - $status = "almost" if !$status && m,(passed|failed) unexpectedly,;
> - $status = "almost" if !$status && m,did not behave as expected,;
> - $status = "ok" if !$status && m,tests? w(as|ere) successful,;
> - $status = "ok" if !$status && m,behaved as expected,;
> + $status = set_status ($status, "almost") if m,(passed|failed)
> unexpectedly,;
> + $status = set_status ($status, "almost") if m,did not behave as
> expected,;
> + $status = set_status ($status, "ok") if m,tests? w(as|ere)
> successful,;
> + $status = set_status ($status, "ok") if m,behaved as expected,;
>
> # Automake self test or distcheck output.
> - $status = "ok" if !$status && m,All \d+ tests passed,;
> - $status = "ok" if !$status && m,1 test passed,;
> - $status = "almost" if m,\d+ of \d+ tests failed,;
> + $status = set_status ($status, "ok") if m,All \d+ tests passed,;
> + $status = set_status ($status, "ok") if m,1 test passed,;
> + $status = set_status ($status, "almost") if m,\d+ of \d+ tests
> failed,;
>
> # libcheck self tests.
> - $status = "almost" if !$status && m,Errors: [1-9]+,;
> - $status = "almost" if!$status && m,Failures: [1-9]+,;
> + $status = set_status ($status, "almost") if m,Errors: [1-9]+,;
> + $status = set_status ($status, "almost") if m,Failures: [1-9]+,;
>
> # Dejagnu self tests.
> - $status = "ok" if !$status && m,^# of expected ,;
> - $status = "almost" if m,# of unexpected ,;
> + $status = set_status ($status, "ok") if m,^# of expected ,;
> + $status = set_status ($status, "almost") if m,# of unexpected ,;
>
> # Old (?) automake output.
> - $status = "built" if !$status && m,archives ready for distribution,;
> + $status = set_status ($status, "built") if m,archives ready for
> distribution,;
>
> # Works for GNU make.
> $project = $2 if !$project && m,Entering directory
> `(<[^>]+>)?.*/([a-z-]+)-[0-9.a-z-]+/.*(<[^>]+>)?',;
> @@ -222,9 +241,9 @@ foreach $arg (@ARGV) {
> $revision = $1 if !$revision && m,/[a-z0-9-]+-([0-9.a-z-]+).tar.gz,;
>
> # Errors from AIX make.
> - $status = "fail" if m,^make:.*The error code from the last command
> is \d+,;
> + $status = set_status ($status, "fail") if m,^make:.*The error code
> from the last command is \d+,;
> # Errors from IRIX make.
> - $status = "fail" if m,^\*\*\* Error code \d+,;
> + $status = set_status ($status, "fail") if m,^\*\*\* Error code \d+,;
> }
>
> close FH;
> --
> 1.7.2.rc3.47.g996ce
>
> From eda3c66613925361ed8595e2e79260c12c0caea9 Mon Sep 17 00:00:00 2001
> From: Ralf Wildenhues <address@hidden>
> Date: Tue, 10 Aug 2010 19:41:33 +0200
> Subject: [PATCH 4/4] Merge Automake matches.
>
> ---
> autobuild | 4 +---
> 1 files changed, 1 insertions(+), 3 deletions(-)
>
> diff --git a/autobuild b/autobuild
> index cb797a6..eb349c6 100755
> --- a/autobuild
> +++ b/autobuild
> @@ -200,6 +200,7 @@ foreach $arg (@ARGV) {
> $status = set_status ($status, "ok") if m,All \d+ tests passed,;
> $status = set_status ($status, "ok") if m,1 test passed,;
> $status = set_status ($status, "almost") if m,\d+ of \d+ tests
> failed,;
> + $status = set_status ($status, "built") if m,archives ready for
> distribution,;
>
> # libcheck self tests.
> $status = set_status ($status, "almost") if m,Errors: [1-9]+,;
> @@ -209,9 +210,6 @@ foreach $arg (@ARGV) {
> $status = set_status ($status, "ok") if m,^# of expected ,;
> $status = set_status ($status, "almost") if m,# of unexpected ,;
>
> - # Old (?) automake output.
> - $status = set_status ($status, "built") if m,archives ready for
> distribution,;
> -
> # Works for GNU make.
> $project = $2 if !$project && m,Entering directory
> `(<[^>]+>)?.*/([a-z-]+)-[0-9.a-z-]+/.*(<[^>]+>)?',;
> $revision = $2 if !$revision && m,Entering directory
> `(<[^>]+>)?.*/[a-z-]+-([0-9.a-z-]+)/.*(<[^>]+>)?',;
- [Autobuild-discuss] Re: four small patches,
Simon Josefsson <=