예제 #1
0
		protected bool Execute()
		{
			File.Copy("SafetySharp.Modeling.dll", Path.Combine(_directory, "Binaries/Release/SafetySharp.Modeling.dll"), overwrite: true);

			var process = new ExternalProcess(Path.Combine(_directory, "Binaries/Release/Test.exe"), "");
			process.Run();

			return process.ExitCode == 0;
		}
예제 #2
0
		protected bool Compile(string testFile)
		{
			var projectPath = Path.Combine(_directory, "TestProject.csproj");

			File.Copy("End2End/Files/TestProject.csproj", projectPath, overwrite: true);
			File.Copy(Path.Combine("End2End/Files", testFile), Path.Combine(_directory, "TestCode.cs"), overwrite: true);

			var msbuildPath = ToolLocationHelper.GetPathToBuildTools(ToolLocationHelper.CurrentToolsVersion);

			var process = new ExternalProcess(Path.Combine(msbuildPath, "msbuild.exe"),
				$"\"{projectPath}\" /p:Configuration=Release /p:Platform=AnyCPU /nr:false",
				message => Output.Log("{0}", message));

			process.Run();
			return process.ExitCode == 0;
		}