@@ -149,14 +149,17 @@ final class IntegrationTests: IntegrationTestCase {
149
149
return
150
150
}
151
151
152
+ /// The root directory, where build/, llvm-project/, and swift/ live.
153
+ let swiftRootDir = packageDirectory. parentDirectory
154
+
152
155
// SWIFT_DRIVER_LIT_DIR may be relative or absolute. If it's
153
156
// relative, it's relative to the parent directory of the package. If
154
157
// you've cloned this package into a Swift compiler working directory,
155
158
// that means it'll be the directory with build/, llvm/, swift/, and
156
159
// swift-driver/ in it.
157
160
let litConfigDir = AbsolutePath (
158
161
litConfigPathString,
159
- relativeTo: packageDirectory . parentDirectory
162
+ relativeTo: swiftRootDir
160
163
)
161
164
162
165
/// The site config file to use.
@@ -168,9 +171,6 @@ final class IntegrationTests: IntegrationTestCase {
168
171
/// The path to the real frontend we should use.
169
172
let frontendFile = swiftBuildDir. appending ( components: " bin " , " swift " )
170
173
171
- /// The root directory, where build/, llvm-project/, and swift/ live.
172
- let swiftRootDir = swiftBuildDir. parentDirectory. parentDirectory. parentDirectory
173
-
174
174
/// The path to lit.py.
175
175
let litFile = swiftRootDir. appending ( components: " llvm-project " , " llvm " , " utils " , " lit " ,
176
176
" lit.py " )
0 commit comments