Bug 116332 - Hard to figure out how to run a single test with run-api-tests
Summary: Hard to figure out how to run a single test with run-api-tests
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Brian Burg
Depends on:
Reported: 2013-05-17 10:40 PDT by Jessie Berlin
Modified: 2014-05-02 12:54 PDT (History)
5 users (show)

See Also:

the patch (1.45 KB, patch)
2014-05-02 10:26 PDT, Brian Burg
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jessie Berlin 2013-05-17 10:40:06 PDT
Jessies-MacBook-P:Scripts jessieberlin$ run-api-tests --help
Usage: run-api-tests [options] [suite or test prefixes]
  --help                Show this help message
  -v|--verbose          Verbose output
  -d|--dump-tests       Dump the names of testcases without running them
  --[no-]build          Build (or do not build) unit tests prior to running (default: build)
  --root=               Path to the pre-built root containing TestWebKitAPI

Jessies-MacBook-P:Scripts jessieberlin$ run-test-webkit-api --help
Usage: run-test-webkit-api [options] [args ...]
  --help                            Show this help message
  --no-saved-state                  Launch the application without state restoration (OS X 10.7 and later)
  --guard-malloc                    Enable Guard Malloc (OS X only)
  --use-web-process-xpc-service     Launch the Web Process as an XPC Service (OS X only)

Nothing in there tells me I need to do the following to just run a single test
run-api-tests WebKit2.AboutBlankLoad
run-test-webkit-api --gtest_filter=WebKit2.AboutBlankLoad

It took grepping the tools to find something that indicated I needed to pass --gtest-filter=“WebKit2.AboutBlankLoad” as an argument to Xcode and only then did I realize that you need to add the “Suite Name” to the front of the test name.

I feel like I have to go through this 10 to 15 minute discovery every single time I want to add a test. We should be printing more helpful help about how to run a single test for each of those scripts.
Comment 1 Brian Burg 2014-05-02 10:25:19 PDT
run-test-webkit-api no longer exists, apparently.
Comment 2 Brian Burg 2014-05-02 10:26:30 PDT
Created attachment 230670 [details]
the patch
Comment 3 WebKit Commit Bot 2014-05-02 12:54:45 PDT
Comment on attachment 230670 [details]
the patch

Clearing flags on attachment: 230670

Committed r168184: <http://trac.webkit.org/changeset/168184>
Comment 4 WebKit Commit Bot 2014-05-02 12:54:48 PDT
All reviewed patches have been landed.  Closing bug.