Use built version of redist instead of stage 0 for running tests
This commit is contained in:
parent
e13e5fca99
commit
b7e4f06bed
4 changed files with 7 additions and 64 deletions
|
@ -54,8 +54,12 @@ namespace Microsoft.DotNet.Tests.EndToEnd
|
||||||
.WithWorkingDirectory(projectDirectory);
|
.WithWorkingDirectory(projectDirectory);
|
||||||
|
|
||||||
// Set DOTNET_ROOT as workaround for https://github.com/dotnet/cli/issues/10196
|
// Set DOTNET_ROOT as workaround for https://github.com/dotnet/cli/issues/10196
|
||||||
|
var dotnetRoot = Path.GetDirectoryName(RepoDirectoriesProvider.DotnetUnderTest);
|
||||||
|
if (!string.IsNullOrEmpty(dotnetRoot))
|
||||||
|
{
|
||||||
runCommand = runCommand.WithEnvironmentVariable(Environment.Is64BitProcess ? "DOTNET_ROOT" : "DOTNET_ROOT(x86)",
|
runCommand = runCommand.WithEnvironmentVariable(Environment.Is64BitProcess ? "DOTNET_ROOT" : "DOTNET_ROOT(x86)",
|
||||||
Path.GetDirectoryName(DotnetUnderTest.FullName));
|
dotnetRoot);
|
||||||
|
}
|
||||||
|
|
||||||
runCommand.ExecuteWithCapturedOutput()
|
runCommand.ExecuteWithCapturedOutput()
|
||||||
.Should().Pass()
|
.Should().Pass()
|
||||||
|
|
|
@ -25,16 +25,6 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
|
||||||
return new AndConstraint<StringAssertions>(assertions);
|
return new AndConstraint<StringAssertions>(assertions);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static AndConstraint<StringAssertions> BeVisuallyEquivalentToIfNotLocalized(this StringAssertions assertions, string expected, string because = "", params object[] becauseArgs)
|
|
||||||
{
|
|
||||||
if (!DotnetUnderTest.IsLocalized())
|
|
||||||
{
|
|
||||||
return BeVisuallyEquivalentTo(assertions, expected, because, becauseArgs);
|
|
||||||
}
|
|
||||||
|
|
||||||
return new AndConstraint<StringAssertions>(assertions);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static AndConstraint<StringAssertions> ContainVisuallySameFragment(this StringAssertions assertions, string expected, string because = "", params object[] becauseArgs)
|
public static AndConstraint<StringAssertions> ContainVisuallySameFragment(this StringAssertions assertions, string expected, string because = "", params object[] becauseArgs)
|
||||||
{
|
{
|
||||||
Execute.Assertion
|
Execute.Assertion
|
||||||
|
@ -44,15 +34,5 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
|
||||||
|
|
||||||
return new AndConstraint<StringAssertions>(assertions);
|
return new AndConstraint<StringAssertions>(assertions);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static AndConstraint<StringAssertions> ContainVisuallySameFragmentIfNotLocalized(this StringAssertions assertions, string expected, string because = "", params object[] becauseArgs)
|
|
||||||
{
|
|
||||||
if (!DotnetUnderTest.IsLocalized())
|
|
||||||
{
|
|
||||||
return ContainVisuallySameFragment(assertions, expected, because, becauseArgs);
|
|
||||||
}
|
|
||||||
|
|
||||||
return new AndConstraint<StringAssertions>(assertions);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,7 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
|
||||||
public class DotnetCommand : TestCommand
|
public class DotnetCommand : TestCommand
|
||||||
{
|
{
|
||||||
public DotnetCommand()
|
public DotnetCommand()
|
||||||
: this(DotnetUnderTest.FullName)
|
: this(RepoDirectoriesProvider.DotnetUnderTest)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,41 +0,0 @@
|
||||||
// Copyright (c) .NET Foundation and contributors. All rights reserved.
|
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.IO;
|
|
||||||
using System.Globalization;
|
|
||||||
using Microsoft.DotNet.Cli.Utils;
|
|
||||||
|
|
||||||
namespace Microsoft.DotNet.Tools.Test.Utilities
|
|
||||||
{
|
|
||||||
public static class DotnetUnderTest
|
|
||||||
{
|
|
||||||
static string _pathToDotnetUnderTest;
|
|
||||||
|
|
||||||
public static string FullName
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
if (_pathToDotnetUnderTest == null)
|
|
||||||
{
|
|
||||||
_pathToDotnetUnderTest = new Muxer().MuxerPath;
|
|
||||||
}
|
|
||||||
|
|
||||||
return _pathToDotnetUnderTest;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static bool IsLocalized()
|
|
||||||
{
|
|
||||||
for (var culture = CultureInfo.CurrentUICulture; !culture.Equals(CultureInfo.InvariantCulture); culture = culture.Parent)
|
|
||||||
{
|
|
||||||
if (culture.Name == "en")
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Add table
Add a link
Reference in a new issue