-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Allow running tests from a command plugin #4002
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
Allow running tests from a command plugin #4002
Conversation
@swift-ci smoke test |
@@ -223,12 +223,12 @@ public final class UserToolchain: Toolchain { | |||
|
|||
/// Returns the path to llvm-cov tool. | |||
public func getLLVMCov() throws -> AbsolutePath { | |||
return try UserToolchain.getTool("llvm-cov", binDir: self.destination.binDir) | |||
return try UserToolchain.getTool("llvm-cov", binDir: self.swiftCompilerPath.parentDirectory) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one and the one below were actually wrong and didn't work in debug builds of SwiftPM, as these tools come from the toolchain and are not built by SwiftPM. The new code is the same as for the symbol graph extraction tool and the other similar tools.
dc18339
to
4b0827c
Compare
@swift-ci smoke test |
FYI: Working on some of the other feedback here. Will mark as WIP while I do. Should be done later today. |
144b938
to
50c1f05
Compare
@swift-ci smoke test |
This wraps up the last piece for SE-0332, including support for filtering and for capturing code coverage while the tests are running. This uses most of the same implementation that existed in a very specify way in SwiftTestTool.swift, factoring it out into a new shared TestingSupport.swift file and making it more generic. Future refactoring should move it down to a new module that provides the shared test support for use from everywhere.
50c1f05
to
d43183a
Compare
@swift-ci smoke test |
This wraps up the last piece for SE-0332, including support for filtering and for capturing code coverage while the tests are running. This uses most of the same implementation that existed in a very specify way in SwiftTestTool.swift, factoring it out into a new shared TestingSupport.swift file and making it more generic. Future refactoring should move it down to a new module that provides the shared test support for use from everywhere. (cherry picked from commit beac985)
This wraps up the last piece for SE-0332, including support for filtering and for capturing code coverage while the tests are running.
Motivation:
This is specified in SE-0332 (it's the last part of SE-0332 that wasn't yet merged).
Modifications:
SwiftTestTool
, reusing much of the implementation ofswift test
SwiftTestTool
methods so they they can be invoked on request from plugins tooComment
This uses most of the same implementation that existed in a very specify way in SwiftTestTool.swift, factoring it out into a new shared
TestingSupport.swift
file and making it more generic. Future refactoring should move it down to a new module that provides the shared test support for use from everywhere.