Module: tools Branch: master Commit: 75331276b34dea6e5fdddf7e9583ba11f0f6066a URL: http://source.winehq.org/git/tools.git/?a=commit;h=75331276b34dea6e5fdddf7e9...
Author: Alexandre Julliard julliard@winehq.org Date: Thu Apr 21 12:09:15 2011 +0200
winetest: Reject test runs with more than 10 tests skipped by user request.
---
winetest/dissect | 5 ++++- winetest/winetest.conf | 3 +++ 2 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/winetest/dissect b/winetest/dissect index 9dd1903..d0b830b 100755 --- a/winetest/dissect +++ b/winetest/dissect @@ -33,7 +33,7 @@ use open ':utf8'; use CGI qw(:standard); charset("utf-8");
-use vars qw/$gitdir $gitweb $queuedir $datadir $maxmult $maxfilesize/; +use vars qw/$gitdir $gitweb $queuedir $datadir $maxmult $maxuserskips $maxfilesize/; require "winetest.conf";
my $name0=$0; @@ -220,6 +220,7 @@ if ($wine_build) { $merge_base eq $testbuild or mydie "wine build '$wine_build' not a descendant of build $testbuild\n"; }
+my $user_skips = 0; my %dllinfo; /^Dll info:\r?$/ or mydie "no Dll info header: $_"; $box->{data} .= "<h2>DLL version</h2>\n"; @@ -236,6 +237,7 @@ while ($_ = <IN>) { elsif ($2 eq "skipped") { print SUM "- $module - skipped - - - - -\n"; + mydie "too many dlls skipped by user request\n" if ++$user_skips > $maxuserskips; } }
@@ -262,6 +264,7 @@ while (<IN>) { $testbox->{data} .= sprintf "<div class="test result skipped">Skipped by user request.</div>\n"; print SUM "- $dll $unit skipped - - - $source $rev\n"; $dll = undef; + mydie "too many tests skipped by user request\n" if ++$user_skips > $maxuserskips; } } elsif (/^(.*$unit.*: (\d+) tests executed ((\d+) marked as todo, (\d+) failures?), (\d+) skipped.)\r?$/) { $lines++; diff --git a/winetest/winetest.conf b/winetest/winetest.conf index b240ac0..9699503 100644 --- a/winetest/winetest.conf +++ b/winetest/winetest.conf @@ -11,6 +11,9 @@ $gitweb = "http://source.winehq.org/git/wine.git"; # Maximum number of reports for one version and tag $maxmult = 10;
+# Maximum allowed number of explicit user skips +$maxuserskips = 10; + # Maximum size of the report file # This should be in line with programs\winetest\send.c $maxfilesize = 1.5 * 1024 * 1024;