Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SR-4760] SwiftPM should support easier testing of CLI tools #5027

Closed
swift-ci opened this issue May 1, 2017 · 0 comments
Closed

[SR-4760] SwiftPM should support easier testing of CLI tools #5027

swift-ci opened this issue May 1, 2017 · 0 comments

Comments

@swift-ci
Copy link
Contributor

swift-ci commented May 1, 2017

Previous ID SR-4760
Radar None
Original Reporter owensd (JIRA User)
Type Improvement
Status Resolved
Resolution Duplicate

Attachment: Download

Additional Detail from JIRA
Votes 0
Component/s Package Manager
Labels Improvement
Assignee None
Priority Medium

md5: 8fccbe2d18ec1c0fca9f3f68e40552d2

duplicates:

  • SR-1503 Can't test module under linux that has main.swift in it

Issue Description:

Currently SwiftPM forces all code to be put into a separate module in order to be testable. This is extra work and really isn't necessary for CLI tools.

At the very least, the result error is non-obvious.

{{
10:15:58 › swift test
Compile Swift Module 'clitestTests' (1 sources)
Linking ./.build/debug/clitestPackageTests.xctest/Contents/MacOS/clitestPackageTests
Undefined symbols for architecture x86_64:
"__TF7clitest5addmeFT1xSi1ySi_Si", referenced from:
__TFFC12clitestTests13UtilitiesTest7testAddFT_T_u0_KzT_Si in UtilitiesTests.swift.o
ld: symbol(s) not found for architecture x86_64
<unknown>:0: error: link command failed with exit code 1 (use -v to see invocation)
<unknown>:0: error: build had 1 command failures
}}

For instance, the attached project, I would need to move Utilities.swift out into a module to test it.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 4, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant