Skip to content

Commit b9e9b82

Browse files
authored
Merge pull request swiftlang#2223 from ahoppen/ahoppen/test-examples
Run tests of the Examples package in CI
2 parents e2edfab + 42ddda6 commit b9e9b82

File tree

1 file changed

+13
-0
lines changed
  • SwiftSyntaxDevUtils/Sources/swift-syntax-dev-utils/commands

1 file changed

+13
-0
lines changed

SwiftSyntaxDevUtils/Sources/swift-syntax-dev-utils/commands/Test.swift

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ struct Test: ParsableCommand, BuildCommand {
2626
func run() throws {
2727
try runTests()
2828
try runCodeGenerationTests()
29+
try runExamplesTests()
2930

3031
logSection("All tests passed")
3132
}
@@ -55,6 +56,18 @@ struct Test: ParsableCommand, BuildCommand {
5556
)
5657
}
5758

59+
private func runExamplesTests() throws {
60+
logSection("Running Examples Tests")
61+
try invokeSwiftPM(
62+
action: "test",
63+
packageDir: Paths.examplesDir,
64+
additionalArguments: ["--test-product", "ExamplesPackageTests"],
65+
additionalEnvironment: swiftPMEnvironmentVariables,
66+
captureStdout: false,
67+
captureStderr: false
68+
)
69+
}
70+
5871
private func findSwiftpmBinPath(packageDir: URL) throws -> String {
5972
return try invokeSwiftPM(
6073
action: "build",

0 commit comments

Comments
 (0)