PR #4 opened by Kacper Michajłow (kasper93) URL: https://code.ffmpeg.org/FFmpeg/fateserver/pulls/4 Patch URL: https://code.ffmpeg.org/FFmpeg/fateserver/pulls/4.patch
From 3df9447d1086c32a5416d508dc70921ef2267c64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= <[email protected]> Date: Tue, 11 Aug 2026 23:24:52 +0200 Subject: [PATCH 1/3] report,history: link the warning count to the warnings view MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The index already links it, do the same on the report page and in the slot history. Signed-off-by: Kacper Michajłow <[email protected]> --- history.cgi | 5 ++++- report.cgi | 8 +++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/history.cgi b/history.cgi index 5e4f007..0f55404 100755 --- a/history.cgi +++ b/history.cgi @@ -73,7 +73,10 @@ for my $date ((sort { $b cmp $a } @reps)[0..49]) { td $$rep{subarch} || $$rep{arch}; td $$rep{os}; td $$rep{cc}; - td $$rep{nwarn}; + start 'td'; + anchor $$rep{nwarn}, + href => href slot => $$rep{slot}, time => $$rep{date}, log => 'warnings'; + end 'td'; if ($npass) { $rtext = "$npass / $ntest"; $rclass = $$rep{status}==0? 'pass' : $npass? 'warn' : 'fail'; diff --git a/report.cgi b/report.cgi index c9ffae5..771d610 100755 --- a/report.cgi +++ b/report.cgi @@ -108,7 +108,13 @@ if ($gitweb and $$hdr{rev} =~ /(N-)?(.*)/) { end 'tr'; trow 'Date', asctime gmtime parse_date $$hdr{date}; trow 'Status', $npass? "$npass / $ntest" : "$$hdr{errstr} ($$hdr{status})"; -trow 'Warnings', $$rep{nwarn}; +start 'tr'; +td 'Warnings'; +start 'td'; +anchor $$rep{nwarn}, + href => href slot => $$hdr{slot}, time => $$hdr{date}, log => 'warnings'; +end 'td'; +end 'tr'; start 'tr'; td 'Logs'; start 'td'; -- 2.52.0 From daf2cc97a907e119cff55bc078863feaa4977d35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= <[email protected]> Date: Tue, 11 Aug 2026 23:29:41 +0200 Subject: [PATCH 2/3] history: add a warning diff link between consecutive reports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Same as the one in the index, comparing each report against the preceding one. Iterating by index also stops the [0..49] slice from padding short lists with undef. Signed-off-by: Kacper Michajłow <[email protected]> --- history.cgi | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/history.cgi b/history.cgi index 0f55404..ea64375 100755 --- a/history.cgi +++ b/history.cgi @@ -52,7 +52,11 @@ start 'thead'; trowh 'Time', 'Rev', 'Arch', 'OS', 'Compiler', 'Warnings', 'Tests'; end 'thead'; start 'tbody'; -for my $date ((sort { $b cmp $a } @reps)[0..49]) { +my @dates = sort { $b cmp $a } @reps; +my $nshow = @dates < 50 ? @dates : 50; +for my $i (0 .. $nshow - 1) { + my $date = $dates[$i]; + my $pdate = $dates[$i + 1]; # the report preceding this one, if any my $rep = load_summary $slot, $date or next; my $ntest = $$rep{ntests}; my $npass = $$rep{npass}; @@ -74,8 +78,17 @@ for my $date ((sort { $b cmp $a } @reps)[0..49]) { td $$rep{os}; td $$rep{cc}; start 'td'; + start 'div', class => 'pull-left'; anchor $$rep{nwarn}, href => href slot => $$rep{slot}, time => $$rep{date}, log => 'warnings'; + end; + if (defined $pdate) { + start 'div', class => 'pull-right'; + anchor '±', + href => href slot => $$rep{slot}, time => $$rep{date}, + log => "warnings/$pdate"; + end; + } end 'td'; if ($npass) { $rtext = "$npass / $ntest"; -- 2.52.0 From 8a12667eba27e55be9b06143688decb60c2a0e6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= <[email protected]> Date: Tue, 11 Aug 2026 23:41:47 +0200 Subject: [PATCH 3/3] Link revisions to code.ffmpeg.org instead of gitweb MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Kacper Michajłow <[email protected]> --- FATE.pm | 29 +++++++++++++++++++++++++++-- history.cgi | 4 ++-- index.cgi | 4 ++-- report.cgi | 15 ++++++--------- 4 files changed, 37 insertions(+), 15 deletions(-) diff --git a/FATE.pm b/FATE.pm index d74fd00..d0f5508 100644 --- a/FATE.pm +++ b/FATE.pm @@ -35,7 +35,8 @@ BEGIN { cgi_path_is_trustworthy safeparam safeparam_opt safeparam_sort safeparam_slot safeparam_time safeparam_log - $fatedir $recent_age $ancient_age $hidden_age $gitweb/; + rev_url compare_url + $fatedir $recent_age $ancient_age $hidden_age/; } our $fatedir = "/var/www/fateweb"; @@ -43,7 +44,7 @@ our $recent_age = 3600; our $ancient_age = 3 * 86400; our $hidden_age = 30 * 86400; our $pretty_links = 0; -our $gitweb = "https://git.ffmpeg.org/?p=ffmpeg.git"; +our $gitrepo = "https://code.ffmpeg.org/FFmpeg/FFmpeg"; #require "$ENV{FATEWEB_CONFIG}"; @@ -185,6 +186,30 @@ sub load_lastpass { return \%lastpass; } +# The hash in a revision as reported by clients. version.sh generates, in +# order of preference: git describe output <tag>-<n>-g<hash> with the tag +# name depending on the branch, a bare hash, git-<date>-<hash> in shallow +# clones, and the RELEASE number with -<hash> appended for snapshots or +# nothing linkable at all. +sub rev_hash { + my ($rev) = @_; + return undef if not defined $rev; + return $1 if $rev =~ /-g([0-9a-f]{7,40})\b/; + return $1 if $rev =~ /(?:^|-)([0-9a-f]{7,40})\z/; + return undef; +} + +sub rev_url { + my $hash = rev_hash $_[0]; + return $gitrepo && $hash ? "$gitrepo/commit/$hash" : undef; +} + +sub compare_url { + my $old = rev_hash $_[0]; + my $new = rev_hash $_[1]; + return $gitrepo && $old && $new ? "$gitrepo/compare/$old...$new" : undef; +} + sub parse_date { $_[0] =~ /^(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})$/ or return undef; mktime $6, $5, $4, $3, $2-1, $1-1900; diff --git a/history.cgi b/history.cgi index ea64375..2cf97c0 100755 --- a/history.cgi +++ b/history.cgi @@ -67,9 +67,9 @@ for my $i (0 .. $nshow - 1) { start 'tr', class => 'alt hilight'; td agestr $age, $time; - if ($gitweb and $$rep{rev} =~ /(N-)?(.*)/) { + if (my $url = rev_url $$rep{rev}) { start 'td'; - anchor $$rep{rev}, href => "$gitweb;a=commit;h=$2"; + anchor $$rep{rev}, href => $url; end 'td'; } else { td $$rep{rev}; diff --git a/index.cgi b/index.cgi index 752e4ae..aecd434 100755 --- a/index.cgi +++ b/index.cgi @@ -274,9 +274,9 @@ for my $rep (sort repcmp @reps) { start 'td'; anchor $agestr, href => href slot => $$rep{slot}; end 'td'; - if ($gitweb and $$rep{rev} =~ /(N-)?(.*)/) { + if (my $url = rev_url $$rep{rev}) { start 'td'; - anchor $$rep{rev}, href => "$gitweb;a=commit;h=$2"; + anchor $$rep{rev}, href => $url; end 'td'; } else { td $$rep{rev}; diff --git a/report.cgi b/report.cgi index 771d610..d7fcc3f 100755 --- a/report.cgi +++ b/report.cgi @@ -98,9 +98,9 @@ trow 'Configuration', '<code>' . $$conf{config} . '</code>'; trow 'Comment', $$hdr{comment}; start 'tr'; td 'Revision'; -if ($gitweb and $$hdr{rev} =~ /(N-)?(.*)/) { +if (my $url = rev_url $$hdr{rev}) { start 'td'; - anchor $$hdr{rev}, href => "$gitweb;a=commit;h=$2"; + anchor $$hdr{rev}, href => $url; end 'td'; } else { td $$hdr{rev}; @@ -163,19 +163,16 @@ if ($nfail) { td "stderr", class => 'toggle', onclick => "show_err('$test')"; td $test; td $$rec{status}, class => 'errcode'; - if ($$lastpass{$n} and $gitweb) { - my ($old, $new); - $$lastpass{$n}{rev} =~ /(N-)?(.*)/ and $old = $2; - $$hdr{rev} =~ /(N-)?(.*)/ and $new = $2; - if ($old and $new) { + if ($$lastpass{$n}) { + if (my $url = compare_url $$lastpass{$n}{rev}, $$hdr{rev}) { start 'td'; - anchor $$lastpass{$n}{rev}, href => "$gitweb;a=shortlog;h=$new;hp=$old"; + anchor $$lastpass{$n}{rev}, href => $url; end 'td'; } else { td $$lastpass{$n}{rev}; } } else { - td $$lastpass{$n}? $$lastpass{$n}{rev} : 'n / a'; + td 'n / a'; } end 'tr'; trowa { style => 'display: none' }, ''; # nee -- 2.52.0 _______________________________________________ ffmpeg-devel mailing list -- [email protected] To unsubscribe send an email to [email protected]
