[webkit-reviews] review granted: [Bug 75065] run-api-tests should be able to run individual suites and tests : [Attachment 121342] Patch 5 of 5 v2

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jan 6 06:52:54 PST 2012


Adam Roben (:aroben) <aroben at apple.com> has granted David Kilzer (:ddkilzer)
<ddkilzer at webkit.org>'s request for review:
Bug 75065: run-api-tests should be able to run individual suites and tests
https://bugs.webkit.org/show_bug.cgi?id=75065

Attachment 121342: Patch 5 of 5 v2
https://bugs.webkit.org/attachment.cgi?id=121342&action=review

------- Additional Comments from Adam Roben (:aroben) <aroben at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=121342&action=review


> Tools/Scripts/run-api-tests:139
> +sub filterTests(\@\@)
> +{
> +    my ($tests, $filterList) = @_;
> +    my %suiteNames;
> +    my %testNames;
> +
> +    foreach my $filter (@$filterList) {
> +	   if ($filter =~ m/\./) {
> +	       $testNames{$filter} = 1;
> +	   } else {
> +	       $suiteNames{$filter} = 1;
> +	   }
> +    }
> +
> +    my @filteredTests = grep {
> +	   my $suite = (split(/\./, $_))[0];
> +	   exists $suiteNames{$suite} || exists $testNames{$_};
> +    } @$tests;
> +
> +    return @filteredTests;
> +}

Maybe we don't need to be so strict. The strings passed on the command line
could just be treated as prefixes of fully-qualified test names. Any test that
starts with a prefix that was specified on the command line will be run. That
would allow someone to specify "MetaAllocatorTest.Repeat" and have all the
tests that start with that prefix run, or to specify "RetainPtr" and have both
the RetainPtr and RetainPtrHashing suites run. (If they just want the RetainPtr
suite to run they can say "RetainPtr.".) It would probably allow a slightly
simpler implementation too.


More information about the webkit-reviews mailing list