Skip to content

Commit b58e268

Browse files
committed
Consider excludes while walking Tests
1 parent 6b85ded commit b58e268

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Sources/Transmute/Package+testModules.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ import Utility
1313

1414
extension Package {
1515
func testModules() throws -> [TestModule] {
16-
return try walk(path, "Tests", recursively: false).filter{ $0.isDirectory }.map { dir in
16+
let testsPath = Path.join(path, "Tests")
17+
//Don't try to walk Tests if it is in excludes
18+
if testsPath.isDirectory && excludes.contains(testsPath) { return [] }
19+
return try walk(testsPath, recursively: false).filter(shouldConsiderDirectory).map { dir in
1720
return TestModule(basename: dir.basename, sources: try self.sourcify(dir))
1821
}
1922
}

0 commit comments

Comments
 (0)