swiftlang / swift-corelibs-xctest

The XCTest Project, A Swift core library for providing unit test support
swift.org
Apache License 2.0
1.15k stars 265 forks source link

[SR-12962] Enabling code coverage, file are missing in the main target. #350

Open swift-ci opened 4 years ago

swift-ci commented 4 years ago
Previous ID SR-12962
Radar None
Original Reporter tamil_27 (JIRA User)
Type Bug

Attachment: Download

Environment Xcode 11.3.1 Swift 5
Additional Detail from JIRA | | | |------------------|-----------------| |Votes | 0 | |Component/s | XCTest | |Labels | Bug, CodeCoverage, XCTest, xcframework | |Assignee | None | |Priority | Medium | md5: c4859ac99c7b2abc9738698c63d6eb36

Issue Description:

After enabling code coverage, under main target i can see only two files but actual files are more than 1000+. Any idea why we are getting only two files ?

swift-ci commented 4 years ago

Comment by Sachin Vas (JIRA)

573f (JIRA User) Can you please let us know what is the issue here?

swift-ci commented 4 years ago

Comment by Stephen Skubik-Peplaski (JIRA)

I am not associated with this issue.

swift-ci commented 4 years ago

Comment by Wes Campaigne (JIRA)

Is the code under testing being built with "whole module" compilation mode, or is it using "incremental"?

I was just experiencing a similar issue, and switching the compilation mode setting from "whole module" to "incremental" in the build configuration being used for the tests fixed it.