[PR] Show reports from runs where configure failed (PR #8)

Kacper Michajłow via ffmpeg-devel <[email protected]>
Newsgroups gmane.comp.video.ffmpeg.devel
Message-ID <[email protected]>
PR #8 opened by Kacper Michajłow (kasper93)
URL: https://code.ffmpeg.org/FFmpeg/fateserver/pulls/8
Patch URL: https://code.ffmpeg.org/FFmpeg/fateserver/pulls/8.patch

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]>


From a8d5c0aa54a2637665f8e3a7a2d2fbe5b3917b9d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= <[email protected]>
Date: Sat, 15 Aug 2026 20:24:24 +0200
Subject: [PATCH] Show reports from runs where configure failed
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

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;
-- 
2.52.0

_______________________________________________
ffmpeg-devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.