[webkit-reviews] review denied: [Bug 68511] [EFL] Script for running WebKit-EFL Unit Tests : [Attachment 108124] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Sep 21 10:53:56 PDT 2011
Leandro Pereira <leandro at profusion.mobi> has denied Krzysztof
<k.czech at samsung.com>'s request for review:
Bug 68511: [EFL] Script for running WebKit-EFL Unit Tests
https://bugs.webkit.org/show_bug.cgi?id=68511
Attachment 108124: Patch
https://bugs.webkit.org/attachment.cgi?id=108124&action=review
------- Additional Comments from Leandro Pereira <leandro at profusion.mobi>
View in context: https://bugs.webkit.org/attachment.cgi?id=108124&action=review
Informal r- for the reasons below.
> Tools/Scripts/run-efl-tests:52
> +sub runTest
> +{
> + my $args = @_[0];
> + my $pathToBinary = "Source/Programs/EUnitTests";
> + my $utName = "";
> + if (length($args) > 0) {
> + $utName = " --gtest_filter=" . $args . ".*" . "\n";
> + }
> + exit system($pathToBinary . $utName);
My Perl-fu is a bit rusty, but wouldn't the following be more readable and less
prone to escaping problems?
sub runTest {
my ($testFilter) = @_;
my $pathToTestUtility = 'Source/Programs/EUnitTests';
my @testArgs = ($pathToTestUtility);
push @testArgs, ('--gtest_filter', "${testFilter}.*\n") if $testFilter;
return system(@testArgs);
}
> Tools/Scripts/run-efl-tests:57
> +sub usage
> +{
> + my $programName = basename($0);
Even though this is fine, the common pattern in WebKitPerl is to declare
subroutine parameters as such (notice the more descriptive name as well):
sub printUsage
{
my ($programName) = @_;
...
}
> Tools/Scripts/run-efl-tests:64
> + print STDERR $usageText;
Why is this printed to STDERR?
> Tools/Scripts/run-efl-tests:65
> + exit 1;
Why does the program return 1 when successfully printing the help output?
More information about the webkit-reviews
mailing list