Skip to content

Commit cea2df6

Browse files
committed
Consider excludes while walking Tests
1 parent e4a34f7 commit cea2df6

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 walk(path, "Tests", recursively: false).filter{ $0.isDirectory }.flatMap { 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 walk(testsPath, recursively: false).filter(shouldConsiderDirectory).flatMap { dir in
1720
if let sources = try? self.sourcify(dir) {
1821
return TestModule(basename: dir.basename, sources: sources)
1922
} else {

0 commit comments

Comments
 (0)