File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
LibGit2Sharp.Tests/TestHelpers Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -72,6 +72,20 @@ private static void SetUpTestEnvironment()
72
72
SubmoduleTargetTestRepoWorkingDirPath = Path . Combine ( sourceRelativePath , "submodule_target_wd" ) ;
73
73
AssumeUnchangedRepoWorkingDirPath = Path . Combine ( sourceRelativePath , "assume_unchanged_wd" ) ;
74
74
SubmoduleSmallTestRepoWorkingDirPath = Path . Combine ( sourceRelativePath , "submodule_small_wd" ) ;
75
+
76
+ CleanupTestReposOlderThan ( TimeSpan . FromMinutes ( 15 ) ) ;
77
+ }
78
+
79
+ private static void CleanupTestReposOlderThan ( TimeSpan olderThan )
80
+ {
81
+ var oldTestRepos = new DirectoryInfo ( Constants . TemporaryReposPath ) . EnumerateDirectories ( "*" )
82
+ . Where ( di => di . CreationTimeUtc < DateTimeOffset . Now . Subtract ( olderThan ) )
83
+ . Select ( di => di . FullName ) ;
84
+
85
+ foreach ( var dir in oldTestRepos )
86
+ {
87
+ DirectoryHelper . DeleteDirectory ( dir ) ;
88
+ }
75
89
}
76
90
77
91
private static bool IsFileSystemCaseSensitiveInternal ( )
You can’t perform that action at this time.
0 commit comments