[tools] winetest/gather: Fix test_links() when the source file is unknown.

Francois Gouget fgouget at codeweavers.com
Fri Feb 19 07:41:01 CST 2021


This can happen if a given test unit (or just its source field) is
missing from a set of report summary files (e.g. from ReportTest).

Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
---
 winetest/gather | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/winetest/gather b/winetest/gather
index 31ba8fa03..89486974d 100755
--- a/winetest/gather
+++ b/winetest/gather
@@ -722,6 +722,8 @@ sub test_links($$)
 {
     my ($testname, $group) = @_;
     my $source = $alltests{$testname};
+    return "<td></td>" if (!defined $source);
+
     return "<td class=\"links\"><a href=\"$gitweb/?a=history;f=$source;hb=$build\" title=\"$source change history\">history</a>" .
            " | <a href=\"$gitweb/?a=blob;f=$source;hb=$build\" title=\"$source source code\">source</a>" .
            (defined($group) ? " | <a href=\"index.html#$testname\" title=\"summary of $testname results across platforms\">summary</a>" : "") .
-- 
2.20.1




More information about the wine-devel mailing list