Skip to content

Commit 6b728e5

Browse files
authored
Merge pull request #705 from ahoppen/ahoppen/interface-test-logging
Add extended logging to SwiftIntefaceTests.testSystemModuleInterface
2 parents 21481f0 + 3381602 commit 6b728e5

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Tests/SourceKitLSPTests/SwiftInterfaceTests.swift

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import Foundation
1414
import LanguageServerProtocol
1515
import LSPTestSupport
16+
import LSPLogging
1617
import SKTestSupport
1718
import SourceKitLSP
1819
import XCTest
@@ -55,6 +56,17 @@ final class SwiftInterfaceTests: XCTestCase {
5556
}
5657

5758
func testSystemModuleInterface() throws {
59+
// This test is failing non-deterministically in CI becaue the file contents
60+
// of the generated interface just contain a newline.
61+
// I cannot reproduce the failure locally. Add some logging to determine
62+
// whether the issue is sourcekitd not returning an empty generated
63+
// interface or something around how the file is handled.
64+
// Remove this lowering of the log level once we have determined what the
65+
// issue is (rdar://104871745).
66+
let previousLogLevel = Logger.shared.currentLevel
67+
defer { Logger.shared.setLogLevel(previousLogLevel.description) }
68+
Logger.shared.setLogLevel("debug")
69+
5870
let url = URL(fileURLWithPath: "/\(UUID())/a.swift")
5971
let uri = DocumentURI(url)
6072

0 commit comments

Comments
 (0)