Skip to content
You signed in with another tab or window. Reload to refresh your session.
You signed out in another tab or window. Reload to refresh your session.
You switched accounts on another tab or window. Reload to refresh your session.
Dismiss alert
File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
LibGit2Sharp.Tests/TestHelpers Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -72,6 +72,21 @@ 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 )
82
+ . EnumerateDirectories ( )
83
+ . Where ( di => di . CreationTimeUtc < DateTimeOffset . Now . Subtract ( olderThan ) )
84
+ . Select ( di => di . FullName ) ;
85
+
86
+ foreach ( var dir in oldTestRepos )
87
+ {
88
+ DirectoryHelper . DeleteDirectory ( dir ) ;
89
+ }
75
90
}
76
91
77
92
private static bool IsFileSystemCaseSensitiveInternal ( )
You can’t perform that action at this time.
0 commit comments