Module: tools Branch: master Commit: 574d4acf228efc4b7f404568c20d3767eb50ac2a URL: https://source.winehq.org/git/tools.git/?a=commit;h=574d4acf228efc4b7f404568...
Author: Francois Gouget fgouget@codeweavers.com Date: Fri Feb 19 01:42:26 2021 +0100
winetest/dissect: Stop get_source_link() from interfering with check_unit().
When calling get_source_link() before check_unit(), setting $broken causes check_unit() to think the misplaced test unit issue has already been reported.
Signed-off-by: Francois Gouget fgouget@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
winetest/dissect | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/winetest/dissect b/winetest/dissect index 4f15bdd..4ad98d1 100755 --- a/winetest/dissect +++ b/winetest/dissect @@ -454,16 +454,11 @@ my ($extra_failures, $failed_units) = (0, 0); sub get_source_link($$) { my ($_unit, $_lnum) = @_; + # Let the caller check $_unit to not interfere with check_unit()
my $source_link = defined $_unit ? "$_unit.c" : $source ne "-" ? $source : "$dll:$unit"; $source_link .= ":$_lnum" if (defined $_lnum); - if (defined $_unit and !$units{$_unit}) - { - # If the line is not for a current test unit we'll let its - # developer hash it out with the polluter ;-) - $broken = 1; - } - elsif ($source ne "-") + if ($source ne "-") { my $url = "$gitweb/?a=blob;f=$source;hb=$testbuild"; $url .= "#l$_lnum" if (defined $_lnum);