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.

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 triaged this task as Wishlist priority.May 12 2015, 11:40 PM