Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRodrigo Moya <rodrigo.moya@xamarin.com>2019-07-24 13:41:00 +0300
committerRodrigo Moya <rodrigo.moya@xamarin.com>2019-07-25 12:49:24 +0300
commitb03c1c39c7a8c858f44f03bc0c26d3ac8809b5c2 (patch)
tree9eb437a208b3259db4ffcef69f141c862da87b6f /main/src/addins
parentaadbe47f37da405f6b05032d52a95b9ec26f8a97 (diff)
[Tests] Check for specific browsers only if they are installed
Diffstat (limited to 'main/src/addins')
-rw-r--r--main/src/addins/MonoDevelop.DotNetCore/MonoDevelop.DotNetCore.Tests/MonoDevelop.DotNetCore.Tests/DotNetCoreProjectTemplateTests.cs14
1 files changed, 10 insertions, 4 deletions
diff --git a/main/src/addins/MonoDevelop.DotNetCore/MonoDevelop.DotNetCore.Tests/MonoDevelop.DotNetCore.Tests/DotNetCoreProjectTemplateTests.cs b/main/src/addins/MonoDevelop.DotNetCore/MonoDevelop.DotNetCore.Tests/MonoDevelop.DotNetCore.Tests/DotNetCoreProjectTemplateTests.cs
index 473e38e4d1..ebfe72c417 100644
--- a/main/src/addins/MonoDevelop.DotNetCore/MonoDevelop.DotNetCore.Tests/MonoDevelop.DotNetCore.Tests/DotNetCoreProjectTemplateTests.cs
+++ b/main/src/addins/MonoDevelop.DotNetCore/MonoDevelop.DotNetCore.Tests/MonoDevelop.DotNetCore.Tests/DotNetCoreProjectTemplateTests.cs
@@ -25,6 +25,7 @@
// THE SOFTWARE.
using System;
+using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using MonoDevelop.Ide.Templates;
@@ -32,7 +33,7 @@ using MonoDevelop.Projects;
using NUnit.Framework;
using IdeUnitTests;
using MonoDevelop.Projects.FileNesting;
-
+using MonoDevelop.Core.Execution;
namespace MonoDevelop.DotNetCore.Tests
{
@@ -376,10 +377,15 @@ namespace MonoDevelop.DotNetCore.Tests
var template = await ptt.CreateAndBuild (preBuildChecks);
CheckProjectTypeGuids (ptt.Solution, GetProjectTypeGuid (template));
- if (checkExecutionTargets) {
- foreach (var p in ptt.Solution.GetAllProjects ()) {
+ // Blacklist library projects, which don't get any execution target
+ if (checkExecutionTargets && templateId != "Microsoft.Web.Razor.Library.CSharp") {
+ foreach (var p in ptt.Solution.GetAllProjects ().OfType<DotNetProject> ()) {
foreach (var config in p.Configurations) {
- Assert.True (p.GetExecutionTargets (config.Selector)?.Any (x => x.Name.Contains ("Safari")) ?? false, $"Configuration {config.Name} didn't contain Safari");
+ var targets = p.GetExecutionTargets (config.Selector)?.ToList () ?? new List<ExecutionTarget> ();
+ if (System.IO.Directory.Exists ("/Applications/Safari.app"))
+ Assert.True (targets.Any (x => x.Name.Contains ("Safari")), $"Configuration {config.Name} didn't contain Safari");
+ if (System.IO.Directory.Exists ("/Applications/Google Chrome.app"))
+ Assert.True (targets.Any (x => x.Name.Contains ("Google Chrome")), $"Configuration {config.Name} didn't contain Chrome");
}
}
}