From 3a7c9c73ed136508d06f4e935830ccceb708933f Mon Sep 17 00:00:00 2001 From: Pranav K Date: Thu, 3 Dec 2015 09:16:00 -0800 Subject: [PATCH] Enabling CoreCLR tests on Travis --- .travis.yml | 2 +- .../MvcRazorHostTest.cs | 4 ++-- .../LanguageViewLocationExpanderTest.cs | 7 ++++++- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 92b2614b16..9086cc32a3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,7 +13,7 @@ addons: before_install: - if test "$TRAVIS_OS_NAME" == "osx"; then brew update; brew install icu4c; fi env: - - KOREBUILD_DNU_RESTORE_CORECLR=true MONO_THREADS_PER_CPU=2000 MONO_MANAGED_WATCHER=disabled + - KOREBUILD_DNU_RESTORE_CORECLR=true MONO_THREADS_PER_CPU=2000 MONO_MANAGED_WATCHER=disabled KOREBUILD_TEST_DNXCORE=true NO_PARALLEL_TEST_PROJECTS=Microsoft.AspNet.Mvc.FunctionalTests mono: - 4.0.5 os: diff --git a/test/Microsoft.AspNet.Mvc.Razor.Host.Test/MvcRazorHostTest.cs b/test/Microsoft.AspNet.Mvc.Razor.Host.Test/MvcRazorHostTest.cs index dce89dab64..592c04cd17 100644 --- a/test/Microsoft.AspNet.Mvc.Razor.Host.Test/MvcRazorHostTest.cs +++ b/test/Microsoft.AspNet.Mvc.Razor.Host.Test/MvcRazorHostTest.cs @@ -34,8 +34,8 @@ namespace Microsoft.AspNet.Mvc.Razor { var data = new TheoryData { "//" }; - // The following scenarios are not relevant in Mono. - if (!TestPlatformHelper.IsMono) + // The following scenarios are only relevant on Windows. + if (TestPlatformHelper.IsWindows) { data.Add("C:/"); data.Add(@"\\"); diff --git a/test/Microsoft.AspNet.Mvc.Razor.Test/LanguageViewLocationExpanderTest.cs b/test/Microsoft.AspNet.Mvc.Razor.Test/LanguageViewLocationExpanderTest.cs index 7bc9744567..a8d135bf58 100644 --- a/test/Microsoft.AspNet.Mvc.Razor.Test/LanguageViewLocationExpanderTest.cs +++ b/test/Microsoft.AspNet.Mvc.Razor.Test/LanguageViewLocationExpanderTest.cs @@ -2,6 +2,7 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Collections.Generic; +using Microsoft.AspNet.Testing.xunit; using Xunit; namespace Microsoft.AspNet.Mvc.Razor @@ -173,7 +174,11 @@ namespace Microsoft.AspNet.Mvc.Razor Assert.Equal(viewLocations, expandedViewLocations); } - [Theory] + [ConditionalTheory] + [OSSkipCondition(OperatingSystems.Linux, + SkipReason = "Invalid culture detection is OS-specific")] + [OSSkipCondition(OperatingSystems.MacOSX, + SkipReason = "Invalid culture detection is OS-specific")] [MemberData(nameof(ViewLocationExpanderTestData))] public void ExpandViewLocations_IncorrectLocaleContextValue(IEnumerable viewLocations) {