Fixes T8042. Changes the way that PhutilUnitTestEngine discovers unit tests. In particular, if you only modify a single test case then there is no reason to run all other test cases within the same directory (which is the current behavior).
Details
Details
- Reviewers
epriestley - Group Reviewers
Blessed Reviewers - Maniphest Tasks
- T8042: PhutilUnitTestEngine can't execute a single test path
- Commits
- rARC8fe013b0ecb5: Allow PhutilUnitTestEngine to execute tests from a single path
Added some unit tests.
Diff Detail
Diff Detail
- Repository
- rARC Arcanist
- Branch
- master
- Lint
Lint Passed - Unit
Tests Passed - Build Status
Buildable 6282 Build 6304: [Placeholder Plan] Wait for 30 Seconds
Event Timeline
Comment Actions
I think I caught an issue? At least, I don't understand the logic.
It would maybe be nice to have some kind of flag which shows which tests will be run without executing them, although maybe this is a task for another time (e.g., after T5568).
src/unit/engine/PhutilUnitTestEngine.php | ||
---|---|---|
190–191 | I would expect && $library_path == $library_root to fail immediately in many cases and throw away most of the test we'd otherwise find. e.g., if you touch /a/b/c/d/e, we'd previously walk up and include /a/b, but now we'll fail out at /a/b/c/d or /a/b/c/d/e or something? |
Comment Actions
Nice!
src/unit/engine/PhutilUnitTestEngine.php | ||
---|---|---|
44–46 | I think id() isn't necessary on newv(), only on new X(). PHP grammar lols |