@@ -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 {
0 commit comments