Skip to content

Commit 290a23d

Browse files
committed
Use configuration on determine test path
Fix https://bugs.swift.org/browse/SR-1159
1 parent 389ce07 commit 290a23d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Sources/swift-test/main.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,15 @@ do {
2121
usage()
2222
case .Run(let xctestArg):
2323
let dir = try directories()
24+
let configuration = "debug" //FIXME should swift-test support configuration option?
2425

2526
func determineTestPath() -> String {
2627

2728
//FIXME better, ideally without parsing manifest since
2829
// that makes us depend on the whole Manifest system
2930

3031
let packageName = dir.root.basename //FIXME probably not true
31-
let maybePath = Path.join(dir.build, "\(packageName).xctest")
32+
let maybePath = Path.join(dir.build, configuration, "\(packageName).xctest")
3233

3334
if maybePath.exists {
3435
return maybePath
@@ -40,7 +41,7 @@ do {
4041
}
4142
}
4243

43-
let yamlPath = Path.join(dir.build, "debug.yaml")
44+
let yamlPath = Path.join(dir.build, "\(configuration).yaml")
4445
try build(YAMLPath: yamlPath, target: "test")
4546

4647
let success = try test(path: determineTestPath(), xctestArg: xctestArg)

0 commit comments

Comments
 (0)