Skip to content

Commit 020d1d7

Browse files
committed
Remove the last lit test
We only had a single lit test left, which was testing the integration of the macro plugin with the compiler. That testing should be covered by us building the macro examples in the `Examples` package, so it’s not needed anymore. rdar://114469622
1 parent 86f50c2 commit 020d1d7

File tree

3 files changed

+0
-268
lines changed

3 files changed

+0
-268
lines changed

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

Lines changed: 0 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,6 @@ struct Test: ParsableCommand, BuildCommand {
2323
@OptionGroup
2424
var arguments: BuildArguments
2525

26-
@Flag(help: "Don't run lit-based tests")
27-
var skipLitTests: Bool = false
28-
29-
@Option(
30-
help: """
31-
Path to the FileCheck executable that was built as part of the LLVM repository.
32-
If not specified, it will be looked up from PATH.
33-
"""
34-
)
35-
var filecheckExec: String?
36-
3726
func run() throws {
3827
try buildExample(exampleName: "ExamplePlugin")
3928

@@ -44,74 +33,6 @@ struct Test: ParsableCommand, BuildCommand {
4433

4534
private func runTests() throws {
4635
logSection("Running SwiftSyntax Tests")
47-
48-
if !skipLitTests {
49-
try runLitTests()
50-
}
51-
52-
try runXCTests()
53-
}
54-
55-
private func runLitTests() throws {
56-
logSection("Running lit-based tests")
57-
58-
guard FileManager.default.fileExists(atPath: Paths.litExec.path) else {
59-
throw ScriptExectutionError(
60-
message: """
61-
Error: Could not find lit.py.
62-
Looking at '\(Paths.litExec.path)'.
63-
64-
Make sure you have the llvm repo checked out next to the swift-syntax repo.
65-
Refer to README.md for more information.
66-
"""
67-
)
68-
}
69-
70-
let examplesBinPath = try findExamplesBinPath()
71-
72-
var litCall = [
73-
Paths.litExec.path,
74-
Paths.packageDir.appendingPathComponent("lit_tests").path,
75-
]
76-
77-
if let filecheckExec {
78-
litCall += ["--param", "FILECHECK=" + filecheckExec]
79-
}
80-
81-
litCall += ["--param", "EXAMPLES_BIN_PATH=" + examplesBinPath.path]
82-
litCall += ["--param", "TOOLCHAIN=" + arguments.toolchain.path]
83-
84-
// Print all failures
85-
litCall += ["--verbose"]
86-
// Don't show all commands if verbose is not enabled
87-
if !arguments.verbose {
88-
litCall += ["--succinct"]
89-
}
90-
91-
guard let pythonExec = Paths.python3Exec else {
92-
throw ScriptExectutionError(message: "Didn't find python3 executable")
93-
}
94-
95-
let process = ProcessRunner(
96-
executableURL: pythonExec,
97-
arguments: litCall
98-
)
99-
100-
let processOutput = try process.run(verbose: arguments.verbose)
101-
102-
if !processOutput.stdout.isEmpty {
103-
logSection("lit test stdout")
104-
print(processOutput.stdout)
105-
}
106-
107-
if !processOutput.stderr.isEmpty {
108-
logSection("lit test stderr")
109-
print(processOutput.stderr)
110-
}
111-
}
112-
113-
private func runXCTests() throws {
114-
logSection("Running XCTests")
11536
var swiftpmCallArguments: [String] = []
11637

11738
if arguments.verbose {

lit_tests/compiler_plugin_basic.swift

Lines changed: 0 additions & 108 deletions
This file was deleted.

lit_tests/lit.cfg

Lines changed: 0 additions & 81 deletions
This file was deleted.

0 commit comments

Comments
 (0)