Bug 136339 - [GTK] test case filter support in run-gtk-tests
Summary: [GTK] test case filter support in run-gtk-tests
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-28 04:48 PDT by Philippe Normand
Modified: 2017-03-11 11:03 PST (History)
5 users (show)

See Also:


Attachments
patch (3.44 KB, patch)
2014-08-28 04:53 PDT, Philippe Normand
no flags Details | Formatted Diff | Diff
patch (3.36 KB, patch)
2014-08-28 05:09 PDT, Philippe Normand
mcatanzaro: review-
buildbot: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from webkit-ews-14 for mac-mountainlion-wk2 (825.24 KB, application/zip)
2014-08-28 08:41 PDT, Build Bot
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Philippe Normand 2014-08-28 04:48:45 PDT
If a test program bundles multiple test-cases it'd be nice to be able to run only a subset of those, especially when adding new test cases.
Comment 1 Philippe Normand 2014-08-28 04:53:55 PDT
Created attachment 237304 [details]
patch
Comment 2 Philippe Normand 2014-08-28 05:09:08 PDT
Created attachment 237306 [details]
patch

Restored executable permissions on file.
Comment 3 Carlos Garcia Campos 2014-08-28 05:23:17 PDT
Comment on attachment 237304 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=237304&action=review

Thanks for working on this, I have few comments/questions.

> Tools/Scripts/run-gtk-tests:325
> +        if self._options.filter and self._options.filter.startswith('/'):
> +            tester_command.extend(['-p', self._options.filter])

So, for glib we only support one test case? What happens if the same test is added and skipped? I guess we should ifgnore skipped tests in this case.

> Tools/Scripts/run-gtk-tests:364
> +        if self._options.filter:
> +            filters = self._options.filter.split(',')
> +            basedir = os.path.basename(os.path.dirname(test_program))
> +            subtests = [ f for f in filters if f.startswith(basedir) ]
> +        if not subtests:
> +            subtests = self._get_tests_from_google_test_suite(test_program)

I wouldn't add the tests if we fail to parse the given test in the filter, if there user gave a bad test or whatever, we should not run any test. So here I would do if self._options.filter: else: subtests = self._get_tests_from_google_test_suite(test_program)

> Tools/Scripts/run-gtk-tests:468
> +    option_parser.add_option('-f', '--filter',
> +                             action='store', type='string', dest='filter', default='',
> +                             help='Execute only the specified test(s) of the suite')

I'm not sure filter is the best name, because skipped tests are also filters, and filter also sounds to me like you might be able to filter out. Maybe -t, --tests? Also the help description says test(s) but it's not clear how to specify more than one test
Comment 4 Build Bot 2014-08-28 08:41:39 PDT
Comment on attachment 237306 [details]
patch

Attachment 237306 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.appspot.com/results/5397164192694272

New failing tests:
compositing/checkerboard.html
compositing/bounds-in-flipped-writing-mode.html
accessibility/adjacent-continuations-cause-assertion-failure.html
canvas/philip/tests/2d.clearRect+fillRect.alpha0.html
http/tests/appcache/abort-cache-onchecking-resource-404.html
animations/animation-border-overflow.html
animations/3d/transform-origin-vs-functions.html
http/tests/appcache/abort-cache-onchecking.html
accessibility/accessibility-object-detached.html
http/tests/appcache/abort-cache-onchecking-manifest-404.html
canvas/philip/tests/2d.clearRect+fillRect.basic.html
animations/animation-add-events-in-handler.html
animations/animation-controller-drt-api.html
animations/3d/replace-filling-transform.html
animations/3d/state-at-end-event-transform.html
canvas/philip/tests/2d.clearRect+fillRect.alpha0.5.html
accessibility/alt-tag-on-image-with-nonimage-role.html
compositing/absolute-position-changed-with-composited-parent-layer.html
Comment 5 Build Bot 2014-08-28 08:41:42 PDT
Created attachment 237312 [details]
Archive of layout-test-results from webkit-ews-14 for mac-mountainlion-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: webkit-ews-14  Port: mac-mountainlion-wk2  Platform: Mac OS X 10.8.5
Comment 6 Michael Catanzaro 2016-01-02 09:45:39 PST
Comment on attachment 237306 [details]
patch

Removing this from request-queue; please respond to Carlos's suggestions! :)