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 --- winetest/dissect | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/winetest/dissect b/winetest/dissect index 32c4a9269..fc83726bf 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);