[swift-users] run a specific test file

Stephen Celis stephen.celis at gmail.com
Mon Dec 7 07:26:59 CST 2015


Hi,

> On Dec 7, 2015, at 8:19 AM, Arsen Gasparyan via swift-users <swift-users at swift.org> wrote:
> 
> Hello,
> Is it possible to run a specific test file like in rspec:
> 
>   rspec path/to/spec/file.rb
> 
> I have tried ./swift/utils/build-script -t swift/test/decl/protocol/req/recursion.swift but it doesn't work.

Check out the Testing doc:

https://github.com/apple/swift/blob/master/docs/Testing.rst#running-the-llvm-lit-based-testsuite

Wherever you ran the `build-script` you should have a `build` directory, so these 2 commands should get you to a build cycle:

    ./swift/utils/build-script
    ./llvm/utils/lit/lit.py -sv ./build/Ninja-DebugAssert/swift-macosx-x86_64/test-macosx-x86_64/decl/protocol/req/

There may be a better way, but this has worked for me so far.

Stephen


More information about the swift-users mailing list