@@ -27,8 +27,6 @@ static BaseFixture()
27
27
{
28
28
// Do the set up in the static ctor so it only happens once
29
29
SetUpTestEnvironment ( ) ;
30
-
31
- DirectoryHelper . DeleteSubdirectories ( Constants . TemporaryReposPath ) ;
32
30
}
33
31
34
32
public static string BareTestRepoPath { get ; private set ; }
@@ -55,34 +53,25 @@ private static void SetUpTestEnvironment()
55
53
{
56
54
IsFileSystemCaseSensitive = IsFileSystemCaseSensitiveInternal ( ) ;
57
55
58
- var source = new DirectoryInfo ( @"../../Resources" ) ;
59
- var resourcesRelativePath = string . Format ( @"Resources/{0}" , Guid . NewGuid ( ) ) ;
60
- ResourcesDirectory = new DirectoryInfo ( resourcesRelativePath ) ;
61
- var parent = new DirectoryInfo ( @"Resources" ) ;
62
-
63
- if ( parent . Exists )
64
- {
65
- DirectoryHelper . DeleteSubdirectories ( parent . FullName ) ;
66
- }
67
-
68
- DirectoryHelper . CopyFilesRecursively ( source , ResourcesDirectory ) ;
56
+ const string sourceRelativePath = @"../../Resources" ;
57
+ ResourcesDirectory = new DirectoryInfo ( sourceRelativePath ) ;
69
58
70
59
// Setup standard paths to our test repositories
71
- BareTestRepoPath = Path . Combine ( resourcesRelativePath , "testrepo.git" ) ;
72
- StandardTestRepoWorkingDirPath = Path . Combine ( resourcesRelativePath , "testrepo_wd" ) ;
73
- StandardTestRepoPath = Path . Combine ( StandardTestRepoWorkingDirPath , ".git " ) ;
74
- ShallowTestRepoPath = Path . Combine ( resourcesRelativePath , "shallow.git" ) ;
75
- MergedTestRepoWorkingDirPath = Path . Combine ( resourcesRelativePath , "mergedrepo_wd" ) ;
76
- MergeRenamesTestRepoWorkingDirPath = Path . Combine ( resourcesRelativePath , "mergerenames_wd" ) ;
77
- MergeTestRepoWorkingDirPath = Path . Combine ( resourcesRelativePath , "merge_testrepo_wd" ) ;
78
- RevertTestRepoWorkingDirPath = Path . Combine ( resourcesRelativePath , "revert_testrepo_wd" ) ;
79
- SubmoduleTestRepoWorkingDirPath = Path . Combine ( resourcesRelativePath , "submodule_wd" ) ;
80
- SubmoduleTargetTestRepoWorkingDirPath = Path . Combine ( resourcesRelativePath , "submodule_target_wd" ) ;
60
+ BareTestRepoPath = Path . Combine ( sourceRelativePath , "testrepo.git" ) ;
61
+ StandardTestRepoWorkingDirPath = Path . Combine ( sourceRelativePath , "testrepo_wd" ) ;
62
+ StandardTestRepoPath = Path . Combine ( StandardTestRepoWorkingDirPath , "dot_git " ) ;
63
+ ShallowTestRepoPath = Path . Combine ( sourceRelativePath , "shallow.git" ) ;
64
+ MergedTestRepoWorkingDirPath = Path . Combine ( sourceRelativePath , "mergedrepo_wd" ) ;
65
+ MergeRenamesTestRepoWorkingDirPath = Path . Combine ( sourceRelativePath , "mergerenames_wd" ) ;
66
+ MergeTestRepoWorkingDirPath = Path . Combine ( sourceRelativePath , "merge_testrepo_wd" ) ;
67
+ RevertTestRepoWorkingDirPath = Path . Combine ( sourceRelativePath , "revert_testrepo_wd" ) ;
68
+ SubmoduleTestRepoWorkingDirPath = Path . Combine ( sourceRelativePath , "submodule_wd" ) ;
69
+ SubmoduleTargetTestRepoWorkingDirPath = Path . Combine ( sourceRelativePath , "submodule_target_wd" ) ;
81
70
}
82
71
83
72
private static bool IsFileSystemCaseSensitiveInternal ( )
84
73
{
85
- var mixedPath = Path . Combine ( Constants . TemporaryReposPath , "mIxEdCase" ) ;
74
+ var mixedPath = Path . Combine ( Constants . TemporaryReposPath , "mIxEdCase-" + Path . GetRandomFileName ( ) ) ;
86
75
87
76
if ( Directory . Exists ( mixedPath ) )
88
77
{
0 commit comments