Ejemplo n.º 1
0
		public UnixRunner (string testsDirectory, Config _config, Benchmark _benchmark, Machine _machine, int _timeoutSeconds, string _runTool, string _runToolArguments)
		{
			config = _config;
			benchmark = _benchmark;
			machine = _machine;
			defaultTimeoutSeconds = _timeoutSeconds;
			runTool = _runTool;
			runToolArguments = _runToolArguments;

			var binaryProtocolFile = _config.ProducesBinaryProtocol ? "binprot.dummy" : null;
			Info = compare.Utils.NewProcessStartInfo (_config, binaryProtocolFile);

			Info.WorkingDirectory = Path.Combine (testsDirectory, benchmark.TestDirectory);

			if (config.AOTOptions != null) {
				if (benchmark.AOTAssemblies == null) {
					Console.Error.WriteLine("Error: benchmark {0} not configured to be executed in AOT mode.", benchmark.Name);
					Environment.Exit(1);
				}
				InfoAot = compare.Utils.NewProcessStartInfo (_config, binaryProtocolFile);
				InfoAot.WorkingDirectory = Path.Combine (testsDirectory, benchmark.TestDirectory);
				InfoAot.Arguments = String.Join (" ", config.AOTOptions.Concat (benchmark.AOTAssemblies));
			}

			var commandLine = benchmark.CommandLine;

			if (benchmark.ClientCommandLine != null) {
				clientServer = true;
				ClientInfo = compare.Utils.NewProcessStartInfo (_config, binaryProtocolFile);
				ClientInfo.WorkingDirectory = Info.WorkingDirectory;
				ClientInfo.Arguments = String.Join (" ", config.MonoOptions.Concat (benchmark.ClientCommandLine));
			} else {
				clientServer = false;
			}

			if (config.NoMono) {
				Info.FileName = Path.Combine (Info.WorkingDirectory, commandLine [0]);
				commandLine = commandLine.Skip (1).ToArray ();
			}

			fileName = Info.FileName;

			arguments = String.Join (" ", config.MonoOptions.Concat (commandLine));
			/* Run with timing */
			if (!config.NoMono)
				arguments = "--stats " + arguments;
		}
Ejemplo n.º 2
0
		public UnixRunner (string testsDirectory, Config _config, Benchmark _benchmark, Machine _machine, int _timeoutSeconds, string _runTool, string _runToolArguments)
		{
			config = _config;
			benchmark = _benchmark;
			machine = _machine;
			defaultTimeoutSeconds = _timeoutSeconds;
			runTool = _runTool;
			runToolArguments = _runToolArguments;

			var binaryProtocolFile = _config.ProducesBinaryProtocol ? "binprot.dummy" : null;
			info = compare.Utils.NewProcessStartInfo (_config, binaryProtocolFile);

			info.WorkingDirectory = Path.Combine (testsDirectory, benchmark.TestDirectory);

			var commandLine = benchmark.CommandLine;

			if (benchmark.ClientCommandLine != null) {
				clientServer = true;
				clientInfo = compare.Utils.NewProcessStartInfo (_config, binaryProtocolFile);
				clientInfo.WorkingDirectory = info.WorkingDirectory;
				clientInfo.Arguments = String.Join (" ", config.MonoOptions.Concat (benchmark.ClientCommandLine));
			} else {
				clientServer = false;
			}

			if (config.NoMono) {
				info.FileName = Path.Combine (info.WorkingDirectory, commandLine [0]);
				commandLine = commandLine.Skip (1).ToArray ();
			}

			fileName = info.FileName;

			arguments = String.Join (" ", config.MonoOptions.Concat (commandLine));
			/* Run with timing */
			if (!config.NoMono)
				arguments = "--stats " + arguments;
		}