Page MenuHomePhabricator

PhutilUnitTestEngine can't execute a single test path
Closed, ResolvedPublic

Description

I find some aspects of the way that PhutilUnitTestEngine works to be counter-intuitive (this might extend to other ArcanistUnitTestEngine subclasses as well). Specifically, it is not possible to execute a single test path. I would expect that arc unit -- src/lint/linter/__tests__/ArcanistChmodLinterTestCase.php would execute only the tests in the ArcanistChmodLinterTestCase class, but instead it executes all tests in the src/lint/linter/__tests__/ directory. This can be annoying when writing new tests (especially tests for linters) because it slows down the ability of running the tests.

Revisions and Commits

Restricted Differential Revision
Restricted Differential Revision

Event Timeline

joshuaspence raised the priority of this task from to Needs Triage.
joshuaspence updated the task description. (Show Details)
joshuaspence added a project: Arcanist.
joshuaspence added a subscriber: joshuaspence.

Easiest fix is probably for files in /__tests__/ directories to not trigger inclusion of other files. I think it's reasonable in the general case that if you only touched /__tests__/x.php, we only run that file, rather than doing the full cascade into all adjacent/parent tests.

joshuaspence added a revision: Restricted Differential Revision.May 4 2015, 10:38 AM
joshuaspence triaged this task as Wishlist priority.May 12 2015, 11:40 PM
joshuaspence closed this task as Resolved by committing Restricted Diffusion Commit.May 28 2015, 8:43 AM
joshuaspence added a commit: Restricted Diffusion Commit.
joshuaspence added a revision: Restricted Differential Revision.May 31 2015, 2:01 AM
joshuaspence added a revision: Restricted Differential Revision.Jun 2 2015, 9:16 PM
joshuaspence added a commit: Restricted Diffusion Commit.Jun 3 2015, 11:08 AM