Skip to content

Commit

Permalink
Revert gradle bump, fix getting absolute paths for excluded tests
Browse files Browse the repository at this point in the history
  • Loading branch information
karolinaoparczyk committed Oct 7, 2024
1 parent 26c0f40 commit a2ddef0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.2-all.zip
5 changes: 4 additions & 1 deletion packages/patrol_cli/lib/src/test_finder.dart
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ class TestFinder {
throwToolExit("Directory ${directory.path} doesn't exist");
}

final absoluteExcludes =
excludes.map((e) => _fs.file(e).absolute.path).toSet();

return directory
.listSync(recursive: true, followLinks: false)
.sorted((a, b) => a.path.compareTo(b.path))
Expand All @@ -99,7 +102,7 @@ class TestFinder {
// Filter out excluded files
.where((fileSystemEntity) {
// TODO: Doesn't handle excluded passes as absolute paths
final isExcluded = excludes.contains(fileSystemEntity.path);
final isExcluded = absoluteExcludes.contains(fileSystemEntity.path);
return !isExcluded;
})
.map((entity) => entity.absolute.path)
Expand Down

0 comments on commit a2ddef0

Please sign in to comment.