1
0
mirror of https://github.com/facebook/proxygen.git synced 2025-08-05 19:55:47 +03:00

getdeps: add filtering of tests

Summary:
For large projects, with lots of tests, running all the tests can take a lot
of time, but for quick development iteration, only a subset of the tests may
be needed to run.

On non-Windows platforms, this can be easily achieved by manually executing
the individual tests binaries and use the builtin filtering mechanism of that
test binary to achieve the goal. On Windows, this can quickly become
impossible as DLLs might not be available, and the right PATH would need to
be manually specified by hand to execute the tests binaries[0].

To solve this, let's simply provide a unified way of running specific tests
by passing in a regexp. Both testpilot and CTest do support regex to execute
specific tests. My understanding is that cargo doesn't yet allows regex, but
will in the future.

[0]: And a missing DLLs would produce no output when executed from
     PowerShell, which makes this very confusing.

Reviewed By: wez

Differential Revision: D21484774

fbshipit-source-id: ee32e950e25bb2a498a2b364a447955a917b0590
This commit is contained in:
Xavier Deguillard
2020-05-11 11:47:50 -07:00
committed by Facebook GitHub Bot
parent 975b7e5e73
commit a01757bb45
2 changed files with 18 additions and 9 deletions

View File

@@ -700,6 +700,7 @@ class TestCmd(ProjectCmdBase):
install_dirs,
schedule_type=args.schedule_type,
owner=args.test_owner,
test_filter=args.filter,
)
install_dirs.append(inst_dir)
@@ -709,6 +710,7 @@ class TestCmd(ProjectCmdBase):
"--schedule-type", help="Indicates how the build was activated"
)
parser.add_argument("--test-owner", help="Owner for testpilot")
parser.add_argument("--filter", help="Only run the tests matching the regex")
@cmd("generate-github-actions", "generate a GitHub actions configuration")