Bump toolchain, use `--enable-test-discovery` (#130)

In the latest 5.3 toolchain all known issues with IndexStoreDB and SwiftPM support were resolved.

Resolves the second point of #42.

Thanks to this you no longer need to maintain `LinuxMain.swift` and `XCTestManifests.swift` files in your test suites, so these are deleted from the test app `Tests` directory.
This commit is contained in:
Max Desiatov 2020-10-20 09:29:25 +01:00 committed by GitHub
parent fc14c28f0c
commit 703078dd83
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 4 additions and 30 deletions

View File

@ -57,7 +57,7 @@
},
{
"package": "swift-argument-parser",
"repositoryURL": "https://github.com/apple/swift-argument-parser",
"repositoryURL": "https://github.com/apple/swift-argument-parser.git",
"state": {
"branch": null,
"revision": "92646c0cdbaca076c8d3d0207891785b3379cbff",

View File

@ -15,7 +15,7 @@ let package = Package(
dependencies: [
.package(url: "https://github.com/swift-server/async-http-client.git", from: "1.1.1"),
.package(
url: "https://github.com/apple/swift-argument-parser",
url: "https://github.com/apple/swift-argument-parser.git",
.upToNextMinor(from: "0.3.0")
),
.package(

View File

@ -12,4 +12,4 @@
// See the License for the specific language governing permissions and
// limitations under the License.
public let defaultToolchainVersion = "wasm-5.3-SNAPSHOT-2020-10-13-a"
public let defaultToolchainVersion = "wasm-5.3-SNAPSHOT-2020-10-15-a"

View File

@ -253,7 +253,7 @@ public final class Toolchain {
let builderArguments = try [
swiftPath.pathString, "build", "-c", isRelease ? "release" : "debug", "--build-tests",
"--destination", inferDestinationPath().pathString,
"--enable-test-discovery", "--destination", inferDestinationPath().pathString,
"-Xswiftc", "-color-diagnostics",
]

View File

@ -1,8 +0,0 @@
import XCTest
import Tests
var tests = [XCTestCaseEntry]()
tests += Tests.__allTests()
XCTMain(tests)

View File

@ -1,18 +0,0 @@
#if !canImport(ObjectiveC)
import XCTest
extension Test {
// DO NOT MODIFY: This is autogenerated, use:
// `swift test --generate-linuxmain`
// to regenerate.
static let __allTests__Test = [
("testTrivial", testTrivial),
]
}
public func __allTests() -> [XCTestCaseEntry] {
[
testCase(Test.__allTests__Test),
]
}
#endif