Imported Upstream version 5.20.0.180

Former-commit-id: ff953ca879339fe1e1211f7220f563e1342e66cb
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2019-02-04 20:11:37 +00:00
parent 0e2d47d1c8
commit 0510252385
3360 changed files with 83827 additions and 39243 deletions

View File

@@ -30,4 +30,4 @@ CLEAN_FILES += $(TEST_RESX_RESOURCES)
$(TEST_RESX_RESOURCES): %.resources: %.resx
$(RESGEN) $< || cp $@.prebuilt $@
$(test_lib_output): $(TEST_RESX_RESOURCES) | $(test_lib_dir)
$(test_lib_output): $(TEST_RESX_RESOURCES) $(test_lib_dir)

View File

@@ -42,35 +42,7 @@ namespace MonoTests.Microsoft.Build.Utilities {
[TestFixture]
public class ToolTaskTest {
//NUnit 2.6 gives much better reporting of individual failures, but Mono currently uses 2.4.x
#if !NUNIT_2_6
[Test]
public void LogEventsFromTextOutput ()
{
foreach (var test in GetErrorParsingTestData ()) {
LogEventsFromTextOutput (test.Raw, test.ExpectedResult);
}
}
class TestCaseData
{
public TestCaseData (string raw, LogEvent expectedResult)
{
Raw = raw;
ExpectedResult = expectedResult;
}
public string Raw { get; private set; }
public LogEvent ExpectedResult { get; private set; }
public TestCaseData SetName (string name)
{
return this;
}
}
#else
[Test, TestCaseSource ("GetErrorParsingTestData")]
#endif
[Test, TestCaseSource (nameof (GetErrorParsingTestData))]
public void LogEventsFromTextOutput (string lineText, LogEvent expected)
{
var task = new LogEventsFromTextOutputToolTask ();
@@ -443,11 +415,12 @@ namespace MonoTests.Microsoft.Build.Utilities {
{
var t = new TestExecuteToolTask ();
t.BuildEngine = new MockBuildEngine ();
t.ToolPath = Directory.GetCurrentDirectory ();
t.ToolExe = "Makefile";
var monoProcess = Process.GetCurrentProcess ().MainModule.FileName;
t.ToolPath = Path.GetDirectoryName (monoProcess);
t.ToolExe = Path.GetFileName (monoProcess);
t.OnExecuteTool = (pathToTool, responseFileCommands, commandLineCommands) => {
Assert.AreEqual (Path.Combine (Directory.GetCurrentDirectory (), "Makefile"), pathToTool, "#1");
Assert.AreEqual (monoProcess, pathToTool, "#1");
Assert.AreEqual ("", responseFileCommands, "#2");
Assert.AreEqual ("", commandLineCommands, "#3");