[swift-users] passing command line arguments to `swift test`

Daniel Dunbar daniel_dunbar at apple.com
Sun May 21 02:37:02 CDT 2017

To run one test you can use:
  swift test -s BasicTests.PathTests/testContains

  swift test --help

 - Daniel

> On May 19, 2017, at 4:34 PM, Kelvin Ma via swift-users <swift-users at swift.org> wrote:
> i want to be able to run a single test case at a time instead of my whole test suite and i’m currently invoking the test binary directly after doing `swift test`
> On May 19, 2017, at 4:56 PM, Brent Royal-Gordon <brent at architechies.com> wrote:
>>> On May 18, 2017, at 8:16 AM, Kelvin Ma via swift-users <swift-users at swift.org> wrote:
>>> Is there a way I can pass command line arguments along to the testing program with `swift test` so that they are visible in `CommandLine.arguments`?
>> No. If there were one, you would not be able to reliably invoke the tests automatically.
>> What are you trying to do? Test code that uses `CommandLine.arguments`?
>> -- 
>> Brent Royal-Gordon
>> Architechies
> _______________________________________________
> swift-users mailing list
> swift-users at swift.org
> https://lists.swift.org/mailman/listinfo/swift-users

More information about the swift-users mailing list