This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch master
in repository fateserver.

The following commit(s) were added to refs/heads/master by this push:
     new a8d5c0a  Show reports from runs where configure failed
a8d5c0a is described below

commit a8d5c0aa54a2637665f8e3a7a2d2fbe5b3917b9d
Author:     Kacper Michajłow <[email protected]>
AuthorDate: Sat Aug 15 20:24:24 2026 +0200
Commit:     Kacper Michajłow <[email protected]>
CommitDate: Sat Aug 22 14:18:52 2026 +0200

    Show reports from runs where configure failed
    
    fate.sh appends ffbuild/config.fate to the report, but configure only
    writes that file on success, so a run that fails in configure submits
    a report with a bare `fate:` header and no `config:` line. load_summary
    and report.cgi expect the `config:` line at a fixed position and reject
    such reports, silently dropping the run from the index and breaking its
    report page. Substitute empty config fields when the line is missing, so
    these runs show up as the build failures they are.
    
    Signed-off-by: Kacper Michajłow <[email protected]>
---
 FATE.pm    | 30 +++++++++++++++++++++++-------
 report.cgi |  5 ++++-
 2 files changed, 27 insertions(+), 8 deletions(-)

diff --git a/FATE.pm b/FATE.pm
index a06f249..01ee6b3 100644
--- a/FATE.pm
+++ b/FATE.pm
@@ -28,7 +28,7 @@ BEGIN {
     $VERSION = 0.1;
     @ISA     = qw/Exporter/;
     @EXPORT  = qw/split_header split_config split_rec parse_date agestr
-                  split_stats load_summary load_report load_lastpass
+                  split_stats null_config load_summary load_report 
load_lastpass
                   start end tag h1 span trow trowa trowh th td anchor
                   esc
                   head1 head2 head3 footer href
@@ -103,6 +103,13 @@ sub split_stats {
     };
 }
 
+# configure writes the config line only when it succeeds, so a report
+# from a run that failed to configure carries none.  Substitute empty
+# fields to keep such reports visible.
+sub null_config {
+    return { map { $_ => '' } qw/arch subarch cpu os cc config/ };
+}
+
 sub split_rec {
     my @rec = split /:/, $_[0];
     return {
@@ -132,24 +139,31 @@ sub load_summary {
 
     if (open S, "$repdir/summary") {
         my $hdr  = split_header scalar <S> or return;
-        my $conf = split_config scalar <S> or return;
-        my $st   = split_stats  scalar <S> or return;
+        my ($conf, $st);
+        while (<S>) {
+            $conf = split_config $_ if /^config:/;
+            $st   = split_stats  $_ if /^stats:/;
+        }
         close S;
+        $st or return;
+        $conf ||= null_config;
         return { %$hdr, %$conf, %$st, owner => owner $slot };
     }
 
     return if not -f "$repdir/report.xz";
     open R, '-|', "unxz -c $repdir/report.xz" or return;
     my $hdr  = split_header scalar <R> or return;
-    my $conf = split_config scalar <R> or return;
+    my $conf;
     my $ntests = 0;
     my $npass = 0;
     while (<R>) {
+        if (/^config:/) { $conf = split_config $_; next }
         my $rec = split_rec $_;
         $$rec{status} == 0 and $npass++;
         $ntests++;
     }
     close R;
+    $conf ||= null_config;
     return { %$hdr, %$conf, ntests => $ntests, npass => $npass,
              nfail => $ntests - $npass };
 }
@@ -164,16 +178,18 @@ sub load_report {
     open R, '-|', "unxz -c $report" or return;
 
     my $hdr  = split_header scalar <R> or return;
-    my $conf = split_config scalar <R> or return;
     $$hdr{version} eq '0' or $$hdr{version} eq '1' or return undef;
 
+    my $conf;
     while (<R>) {
-        my $rec = split_rec $_;
-        push @recs, $rec;
+        if (/^config:/) { $conf = split_config $_; next }
+        push @recs, split_rec $_;
     }
 
     close R;
 
+    $conf ||= null_config;
+
     return { header => $hdr, conf => $conf, recs => \@recs };
 }
 
diff --git a/report.cgi b/report.cgi
index d2a6ed6..50ba500 100755
--- a/report.cgi
+++ b/report.cgi
@@ -36,18 +36,21 @@ my $report = "$repdir/report.xz";
 open R, '-|', "unxz -c $report" or fail 'Requsted report not found';
 
 my $hdr  = split_header scalar <R> or fail 'Invalid report';
-my $conf = split_config scalar <R> or fail 'Invalid report';
 
+my $conf;
 my %pass;
 my %fail;
 
 while (<R>) {
+    if (/^config:/) { $conf = split_config $_; next }
     my $rec = split_rec $_;
     ${$$rec{status}? \%fail: \%pass}{$$rec{name}} = $rec;
 }
 
 close R;
 
+$conf ||= null_config;
+
 my $npass = keys %pass;
 my $nfail = keys %fail;
 my $ntest = $npass + $nfail;

-- 
To stop receiving notification emails like this one, please contact
[email protected].
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to