Franklin Yu
Franklin Yu

Reputation: 9958

Code Coverage Data Generation Failed for Swift 3.0

I am testing a library project; the tests passed with this error message:

Aggregation tool
'/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/llvm-profdata'
failed with exit code 1

I am not using the default toolchain (Swift 2.2) but the latest snapshot. I switched my toolchain in Xcode preference and it builds and runs the tests successfully; it just does not generate code coverage data. I noticed that the llvm-profdata belongs to the default toolchain, but I did not find any llvm-profdata in the corresponding folder of the Swift 3.0 toolchain.

Environment:

I am not familiar with the Swift toolchain; how can I get more information about why llvm-profdata failed, possibly with Xcode command line tools? Or is this a bug in the current version of Swift?

Note:

Upvotes: 2

Views: 601

Answers (1)

David Skrundz
David Skrundz

Reputation: 13347

This is a known issue in the swift package manager. There is currently an open pull request which can be found at: https://github.com/apple/swift-package-manager/pull/184

Edit: It has been pulled in, and is available in Xcode 8

Upvotes: 1

Related Questions