public Runner (string testsDirectory, Config _config, Benchmark _benchmark, Machine _machine, int _timeoutSeconds) { config = _config; benchmark = _benchmark; machine = _machine; defaultTimeoutSeconds = _timeoutSeconds; info = config.NewProcessStartInfo (); info.WorkingDirectory = Path.Combine (testsDirectory, benchmark.TestDirectory); var commandLine = benchmark.CommandLine; if (config.NoMono) { info.FileName = Path.Combine (info.WorkingDirectory, commandLine [0]); commandLine = commandLine.Skip (1).ToArray (); } arguments = String.Join (" ", config.MonoOptions.Concat (commandLine)); }
public static async Task<Benchmark> FromId (string id) { await FetchBenchmarks (); foreach (var kvp in nameToParseObject) { if (kvp.Value.ObjectId == id) { var benchmark = new Benchmark { Name = kvp.Value.Get<string> ("name") }; return benchmark; } } throw new Exception ("Could not fetch benchmark."); }