Currently, we run all (core) test for every iteration of every change on gerrit. This takes on the order of 30 minutes. If we had a way to run only the tests for classes that is affected by a given change, that would save us a lot of time during development. (We'd still want to runn *all* the tests at some point, of course, just to be sure - at least when cutting a deployment branch).
For phpunit, this could be achieved by tracking the dependencies between classes (T351336): When calls X is changed, we need to run only the tests for all the classes that depend on X (directly or indirectly).