Merge pull request #5985 from piotrpMSFT/piotrpMSFT/infra/TestInvokingCLI

Force integration tests to execute tests against invoking CLI, ignoring PATh
This commit is contained in:
Piotr Puszkiewicz 2017-03-09 14:49:23 -08:00 committed by GitHub
commit 1dc7309bec
2 changed files with 27 additions and 2 deletions

View file

@ -1,7 +1,6 @@
// 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 Microsoft.DotNet.Cli.Utils;
namespace Microsoft.DotNet.Tools.Test.Utilities
@ -9,7 +8,7 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
public sealed class DotnetCommand : TestCommand
{
public DotnetCommand()
: base("dotnet")
: base(DotnetUnderTest.FullName)
{
}

View file

@ -0,0 +1,26 @@
// 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 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;
}
}
}
}