RESOLVED FIXED 80083
nrwt: virtual tests aren't being run
https://bugs.webkit.org/show_bug.cgi?id=80083
Summary nrwt: virtual tests aren't being run
Dirk Pranke
Reported 2012-03-01 19:19:12 PST
nrwt: virtual tests aren't being run
Attachments
Patch (3.69 KB, patch)
2012-03-01 19:19 PST, Dirk Pranke
eric: review+
Dirk Pranke
Comment 1 2012-03-01 19:19:45 PST
Eric Seidel (no email)
Comment 2 2012-03-01 19:22:26 PST
Comment on attachment 129792 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=129792&action=review > Tools/Scripts/webkitpy/layout_tests/port/base.py:1086 > + for test in suite.tests: > + if any(test.startswith(p) for p in paths): > + virtual_tests.add(test) > + else: > + virtual_tests.update(set(suite.tests.keys())) I suspect this whole block could be written shorter with comprehesions or a filter statement.
Dirk Pranke
Comment 3 2012-03-01 19:25:53 PST
(In reply to comment #2) > (From update of attachment 129792 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=129792&action=review > > > Tools/Scripts/webkitpy/layout_tests/port/base.py:1086 > > + for test in suite.tests: > > + if any(test.startswith(p) for p in paths): > > + virtual_tests.add(test) > > + else: > > + virtual_tests.update(set(suite.tests.keys())) > > I suspect this whole block could be written shorter with comprehesions or a filter statement. Shorter, probably. I don't know if it would be more comprehensible, though. It's a nested-loop join (meaning for each item in one list we have to iterate over another list), and I find those are usually hard to follow w/ list comprehensions. I don't think there's an eas(ier?) way to do it with filter(), but I could be wrong. This code at least has the virtue of being pretty easy to follow. We could pull the 'if paths' out of the outer loop, and it might be slightly easier to follow as well.
Dirk Pranke
Comment 4 2012-03-01 19:28:35 PST
Note You need to log in before you can comment on or make changes to this bug.