Skip to content

Commit 1dad145

Browse files
committed
Merge pull request #240 from norio-nomura/fix-sr-1159
Use configuration on determine test path
2 parents ecd595a + 290a23d commit 1dad145

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
@@ -27,14 +27,15 @@ do {
2727

2828
case .Run(let specifier):
2929
let dir = try directories()
30+
let configuration = "debug" //FIXME should swift-test support configuration option?
3031

3132
func determineTestPath() -> String {
3233

3334
//FIXME better, ideally without parsing manifest since
3435
// that makes us depend on the whole Manifest system
3536

3637
let packageName = dir.root.basename //FIXME probably not true
37-
let maybePath = Path.join(dir.build, "\(packageName).xctest")
38+
let maybePath = Path.join(dir.build, configuration, "\(packageName).xctest")
3839

3940
if maybePath.exists {
4041
return maybePath
@@ -46,7 +47,7 @@ do {
4647
}
4748
}
4849

49-
let yamlPath = Path.join(dir.build, "debug.yaml")
50+
let yamlPath = Path.join(dir.build, "\(configuration).yaml")
5051
try build(YAMLPath: yamlPath, target: "test")
5152
let success = try test(path: determineTestPath(), xctestArg: specifier)
5253
exit(success ? 0 : 1)

0 commit comments

Comments
 (0)