Skip to content

Running Swift Linux Tests on Mac

Mike Kistler edited this page Mar 24, 2019 · 12 revisions

Setup

Install Docker. See the install instructions in the Docker documentation.

Run

From the root of the Swift SDK

docker pull swift:4.2
docker run -i -t -v $(pwd):/root/swift-sdk swift:4.2 /bin/bash
cd ~/swift-sdk
swift package resolve && swift package clean
swift build

To run all tests:

swift test

To run all tests for a service

swift test --filter AssistantV1Tests.AssistantTests

To run just one test

swift test --filter AssistantV1Tests.AssistantTests/testMessageInvalidWorkspaceID