Module: tools Branch: master Commit: 0a9fded16c707af4b147eb88d25be4eb9ef85426 URL: http://source.winehq.org/git/tools.git/?a=commit;h=0a9fded16c707af4b147eb88d...
Author: Francois Gouget fgouget@codeweavers.com Date: Thu Apr 18 19:24:43 2013 +0200
testbot: Fix handling of tests for dll names containing dots or dashes.
Conformance tests for 'dlls' containing dots in their name, 'winspool.drv' for instance, should be allowed. Wine does not support conformance tests for dlls containing dashes in their names however, 'api-ms-*' for instance, so reject those.
---
testbot/bin/WineRunBuild.pl | 12 +++++++----- testbot/web/Submit.pl | 4 ++-- 2 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/testbot/bin/WineRunBuild.pl b/testbot/bin/WineRunBuild.pl index c230316..98a9211 100755 --- a/testbot/bin/WineRunBuild.pl +++ b/testbot/bin/WineRunBuild.pl @@ -202,14 +202,16 @@ foreach my $OtherStep (@{$Job->Steps->GetItems()})
$Run64 = 1 if ($OtherStep->FileType eq "exe64"); my $OtherFileName = $OtherStep->FileName; - if ($OtherFileName =~ m/^([\w_-]+)(|.exe)_test(|64).exe$/) + if ($OtherFileName =~ m/^([\w_.]+)_test(?:64)?.exe$/) { - if (defined $BaseName and $BaseName ne $1) + my $OtherBaseName = $1; + $OtherBaseName =~ s/.exe$//; + if (defined $BaseName and $BaseName ne $OtherBaseName) { - FatalError "$1 doesn't match previously found $BaseName\n", + FatalError "$OtherBaseName doesn't match previously found $BaseName\n", $FullErrFileName, $Job, $Task; } - $BaseName = $1; + $BaseName = $OtherBaseName; } } if (!defined $BaseName) @@ -292,7 +294,7 @@ if ($NewStatus eq "completed") next if ($OtherStep->No == $StepNo);
my $OtherFileName = $OtherStep->FileName; - next if ($OtherFileName !~ /^[\w_-]+(?:|.exe)_test(?:|64).exe$/); + next if ($OtherFileName !~ /^[\w_.]+_test(?:64)?.exe$/);
my $OtherStepDir = "$DataDir/jobs/$JobId/" . $OtherStep->No; mkdir $OtherStepDir; diff --git a/testbot/web/Submit.pl b/testbot/web/Submit.pl index 42ca77a..f73ae6a 100644 --- a/testbot/web/Submit.pl +++ b/testbot/web/Submit.pl @@ -470,9 +470,9 @@ sub Validate elsif ($self->{Page} == 3 && $self->GetParam("Page") == 3) { if (($self->GetParam("FileType") eq "patchdlls" && - ! ($self->GetParam("TestExecutable") =~ m/^[a-zA-Z0-9_]+_test.exe/)) || + ! ($self->GetParam("TestExecutable") =~ m/^[\w_.]+_test.exe/)) || ($self->GetParam("FileType") eq "patchprograms") && - ! ($self->GetParam("TestExecutable") =~ m/^[a-zA-Z0-9_]+.exe_test.exe/)) + ! ($self->GetParam("TestExecutable") =~ m/^[\w_.]+.exe_test.exe/)) { $self->{ErrMessage} = "Invalid name for Test executable"; $self->{ErrField} = "TestExecutable";