When fixing tests, it’s often useful to be able to run some subset of them, usually based on some pattern. From my searching, the recommended way to do this seems to be to directly invoke `lit.py`. Doing this by hand is tedious, so I use the following script:
../llvm/utils/lit/lit.py -sv --param swift_site_config=../build/Ninja-RelWithDebInfoAssert/swift-macosx-x86_64/test-macosx-x86_64/lit.site.cfg "$@"
But this has the unfortunate downside of hard-coding the compiler to use. It’s also unfortunate for newcomers to the build system, because they need to hunt down this magical invocation, or suffer through running all the tests on every change.
It seems to me that build-script should support this kind of invocation, so that we can say something like:
utils/build-script -r —test-only test/stdlib/Dictionary*