generated from heehaw12345/VFSForGit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSettings.cs
78 lines (70 loc) · 3.47 KB
/
Settings.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
using System;
using System.IO;
using System.Runtime.InteropServices;
namespace GVFS.FunctionalTests.Properties
{
public static class Settings
{
public enum ValidateWorkingTreeMode
{
None = 0,
Full = 1,
SparseMode = 2,
}
public static class Default
{
public static string CurrentDirectory { get; private set; }
public static string RepoToClone { get; set; }
public static string PathToBash { get; set; }
public static string PathToGVFS { get; set; }
public static string Commitish { get; set; }
public static string ControlGitRepoRoot { get; set; }
public static string EnlistmentRoot { get; set; }
public static string FastFetchBaseRoot { get; set; }
public static string FastFetchRoot { get; set; }
public static string FastFetchControl { get; set; }
public static string PathToGit { get; set; }
public static string PathToGVFSService { get; set; }
public static string BinaryFileNameExtension { get; set; }
public static void Initialize()
{
CurrentDirectory = Path.GetFullPath(Path.GetDirectoryName(Environment.GetCommandLineArgs()[0]));
RepoToClone = @"https://gvfs.visualstudio.com/ci/_git/ForTests";
// HACK: This is only different from FunctionalTests/20180214
// in that it deletes the GVFlt_MoveFileTests/LongFileName folder,
// which is causing problems in all tests due to a ProjFS
// regression. Replace this with the expected default after
// ProjFS is fixed and deployed to our build machines.
Commitish = @"FunctionalTests/20201014";
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
EnlistmentRoot = @"C:\Repos\GVFSFunctionalTests\enlistment";
PathToGVFS = @"GVFS.exe";
PathToGit = @"C:\Program Files\Git\cmd\git.exe";
PathToBash = @"C:\Program Files\Git\bin\bash.exe";
ControlGitRepoRoot = @"C:\Repos\GVFSFunctionalTests\ControlRepo";
FastFetchBaseRoot = @"C:\Repos\GVFSFunctionalTests\FastFetch";
FastFetchRoot = Path.Combine(FastFetchBaseRoot, "test");
FastFetchControl = Path.Combine(FastFetchBaseRoot, "control");
PathToGVFSService = @"GVFS.Service.exe";
BinaryFileNameExtension = ".exe";
}
else
{
string root = Path.Combine(
Environment.GetEnvironmentVariable("HOME"),
"GVFS.FT");
EnlistmentRoot = Path.Combine(root, "test");
ControlGitRepoRoot = Path.Combine(root, "control");
FastFetchBaseRoot = Path.Combine(root, "FastFetch");
FastFetchRoot = Path.Combine(FastFetchBaseRoot, "test");
FastFetchControl = Path.Combine(FastFetchBaseRoot, "control");
PathToGVFS = "gvfs";
PathToGit = "/usr/local/bin/git";
PathToBash = "/bin/bash";
BinaryFileNameExtension = string.Empty;
}
}
}
}
}