-
Notifications
You must be signed in to change notification settings - Fork 64
/
Settings.cs
65 lines (58 loc) · 2.52 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
using System;
using System.IO;
using System.Runtime.InteropServices;
namespace Scalar.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 PathToScalar { get; set; }
public static string Commitish { get; set; }
public static string CommitId { get; set; }
public static string ControlGitRepoRoot { get; set; }
public static string EnlistmentRoot { get; set; }
public static string PathToGit { get; set; }
public static string PathToScalarService { 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";
Commitish = @"FunctionalTests/20180214";
CommitId = "2797fbb8358bb2e0c12d6f3b42a60b43f7655edf";
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
EnlistmentRoot = @"C:\Repos\ScalarFunctionalTests\enlistment";
PathToScalar = @"Scalar.exe";
PathToGit = @"C:\Program Files\Git\cmd\git.exe";
PathToBash = @"C:\Program Files\Git\bin\bash.exe";
ControlGitRepoRoot = @"C:\Repos\ScalarFunctionalTests\ControlRepo";
PathToScalarService = @"Scalar.Service.exe";
BinaryFileNameExtension = ".exe";
}
else
{
string root = Path.Combine(
Environment.GetEnvironmentVariable("HOME"),
"Scalar.FT");
EnlistmentRoot = Path.Combine(root, "test");
ControlGitRepoRoot = Path.Combine(root, "control");
PathToScalar = "scalar";
PathToGit = "/usr/local/bin/git";
PathToBash = "/bin/bash";
BinaryFileNameExtension = string.Empty;
}
}
}
}
}