diff --git a/tests/common/mac/ProjectTestHelpers.cs b/tests/common/mac/ProjectTestHelpers.cs index 09c3dcd098..09a097f7b3 100644 --- a/tests/common/mac/ProjectTestHelpers.cs +++ b/tests/common/mac/ProjectTestHelpers.cs @@ -224,12 +224,12 @@ namespace Xamarin.MMP.Tests } // In most cases we generate projects in tmp and this is not needed. But nuget and test projects can make that hard - public static void CleanUnifiedProject (string csprojTarget, bool useMSBuild = false) + public static void CleanUnifiedProject (string csprojTarget) { - RunAndAssert ("/Library/Frameworks/Mono.framework/Commands/" + (useMSBuild ? "msbuild" : "msbuild"), new StringBuilder (csprojTarget + " /t:clean"), "Clean"); + RunAndAssert ("/Library/Frameworks/Mono.framework/Commands/msbuild", new StringBuilder (csprojTarget + " /t:clean"), "Clean"); } - public static string BuildProject (string csprojTarget, bool isUnified, bool diagnosticMSBuild = false, bool shouldFail = false, bool useMSBuild = false, bool release = false, string[] environment = null) + public static string BuildProject (string csprojTarget, bool isUnified, bool diagnosticMSBuild = false, bool shouldFail = false, bool release = false, string[] environment = null) { string rootDirectory = FindRootDirectory (); @@ -375,10 +375,10 @@ namespace Xamarin.MMP.Tests return GenerateEXEProject (config); } - public static string GenerateAndBuildUnifiedExecutable (UnifiedTestConfig config, bool shouldFail = false, bool useMSBuild = false, string[] environment = null) + public static string GenerateAndBuildUnifiedExecutable (UnifiedTestConfig config, bool shouldFail = false, string[] environment = null) { string csprojTarget = GenerateUnifiedExecutableProject (config); - return BuildProject (csprojTarget, isUnified: true, diagnosticMSBuild: config.DiagnosticMSBuild, shouldFail: shouldFail, useMSBuild: useMSBuild, release: config.Release, environment: environment); + return BuildProject (csprojTarget, isUnified: true, diagnosticMSBuild: config.DiagnosticMSBuild, shouldFail: shouldFail, release: config.Release, environment: environment); } public static string RunGeneratedUnifiedExecutable (UnifiedTestConfig config) @@ -388,7 +388,7 @@ namespace Xamarin.MMP.Tests return RunEXEAndVerifyGUID (config.TmpDir, config.guid, exePath); } - public static OutputText TestUnifiedExecutable (UnifiedTestConfig config, bool shouldFail = false, bool useMSBuild = false, string[] environment = null) + public static OutputText TestUnifiedExecutable (UnifiedTestConfig config, bool shouldFail = false, string[] environment = null) { // If we've already generated guid bits for this config, don't tack on a second copy if (config.guid == Guid.Empty) @@ -397,7 +397,7 @@ namespace Xamarin.MMP.Tests config.TestCode += GenerateOutputCommand (config.TmpDir, config.guid); } - string buildOutput = GenerateAndBuildUnifiedExecutable (config, shouldFail, useMSBuild, environment); + string buildOutput = GenerateAndBuildUnifiedExecutable (config, shouldFail, environment); if (shouldFail) return new OutputText (buildOutput, ""); diff --git a/tests/mmptest/src/MMPTest.cs b/tests/mmptest/src/MMPTest.cs index 9c52c7341d..91e2b26728 100644 --- a/tests/mmptest/src/MMPTest.cs +++ b/tests/mmptest/src/MMPTest.cs @@ -357,7 +357,7 @@ namespace Xamarin.MMP.Tests // If we fail, we'll likley fail with "did not generate an exe" before returning but let's check anyway string secondBuildOutput = TI.BuildProject (Path.Combine (tmpDir, TI.GetUnifiedExecutableProjectName (test)), true, diagnosticMSBuild: true); Assert.IsTrue (!secondBuildOutput.Contains ("Skipping target \"_CompileToNative"), "Did not skip"); - Assert.IsTrue (secondBuildOutput.Contains ("CompileToNative needs to be built as output file"), "Did need to build"); + Assert.IsTrue (secondBuildOutput.Contains ("Building target \"_CompileToNative\" completely"), "Did need to build"); } }); } diff --git a/tests/mmptest/src/NetStandardTests.cs b/tests/mmptest/src/NetStandardTests.cs index 70d07c6f34..fa972b9539 100644 --- a/tests/mmptest/src/NetStandardTests.cs +++ b/tests/mmptest/src/NetStandardTests.cs @@ -31,7 +31,7 @@ namespace Xamarin.MMP.Tests { string netStandardProject = TI.GenerateNetStandardProject (config); TI.RunAndAssert("/usr/local/share/dotnet/dotnet", $"restore {netStandardProject}", "Restore"); - TI.BuildProject(netStandardProject, true, useMSBuild: true); + TI.BuildProject(netStandardProject, true); config.ItemGroup = $@" @@ -49,7 +49,7 @@ namespace Xamarin.MMP.Tests { config.CSProjConfig = "--registrar=dynamic"; config.XM45 = full; - TI.TestUnifiedExecutable(config, useMSBuild: true); + TI.TestUnifiedExecutable(config); } } } diff --git a/tests/msbuild-mac/src/RoslynSmokeTests.cs b/tests/msbuild-mac/src/RoslynSmokeTests.cs index 71f5e7d937..6b81270313 100644 --- a/tests/msbuild-mac/src/RoslynSmokeTests.cs +++ b/tests/msbuild-mac/src/RoslynSmokeTests.cs @@ -26,7 +26,7 @@ namespace Xamarin.MMP.Tests TI.CleanUnifiedProject (projectPath); RestoreRoslynNuget ("Modern"); - TI.BuildProject (projectPath, true, useMSBuild: true); + TI.BuildProject (projectPath, true); TI.RunAndAssert (Path.Combine (RoslynTestProjectRoot, "Modern/bin/Debug/RoslynTestApp.app/Contents/MacOS/RoslynTestApp"), new StringBuilder (), "Run"); } @@ -37,7 +37,7 @@ namespace Xamarin.MMP.Tests TI.CleanUnifiedProject (projectPath); RestoreRoslynNuget ("Full"); - TI.BuildProject (projectPath, true, useMSBuild: true); + TI.BuildProject (projectPath, true); TI.RunAndAssert (Path.Combine (RoslynTestProjectRoot, "Full/bin/Debug/RoslynTestApp.app/Contents/MacOS/RoslynTestApp"), new StringBuilder (), "Run"); } } diff --git a/tests/msbuild-mac/src/RuntimeTests.cs b/tests/msbuild-mac/src/RuntimeTests.cs index 8f09dfd61d..f0a1a370c9 100644 --- a/tests/msbuild-mac/src/RuntimeTests.cs +++ b/tests/msbuild-mac/src/RuntimeTests.cs @@ -18,7 +18,7 @@ namespace Xamarin.MMP.Tests var projectPath = Path.Combine (TestProjectRoot, projectName, $"{projectName}.csproj"); TI.CleanUnifiedProject (projectPath); - TI.BuildProject (projectPath, true, useMSBuild: false); + TI.BuildProject (projectPath, true); TI.RunAndAssert (Path.Combine (Path.GetDirectoryName (projectPath), $"bin/Debug/{projectName}.app/Contents/MacOS/{projectName}"), new StringBuilder (), "Run"); } }