[swift-dev] builtin command for invoking a subset of the tests

Tony Parker anthony.parker at apple.com
Fri Oct 14 10:29:49 CDT 2016


Hi Alexis,

In fact there is already a script which is closer to what you want, in swift/utils/run-test. It could probably use some additional love and attention to be a bit more usable (for example, printing out the help if you invoke it with no arguments), but I use it all the time.

- Tony


> On Oct 14, 2016, at 8:24 AM, Alexis via swift-dev <swift-dev at swift.org> wrote:
> 
> 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:
> 
> 
> 
>    #!/bin/bash
> 
>    ../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*
> 
> 
> Thoughts?
> _______________________________________________
> swift-dev mailing list
> swift-dev at swift.org
> https://lists.swift.org/mailman/listinfo/swift-dev



More information about the swift-dev mailing list